{"id":1136039,"date":"2025-01-08T21:31:42","date_gmt":"2025-01-08T13:31:42","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1136039.html"},"modified":"2025-01-08T21:31:44","modified_gmt":"2025-01-08T13:31:44","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e7%94%b5%e8%84%91%e9%87%8c%e7%9a%84python%e7%9b%b8%e5%85%b3%e5%85%a8%e9%83%a8%e5%88%a0%e9%99%a4%e5%90%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1136039.html","title":{"rendered":"\u5982\u4f55\u5c06\u7535\u8111\u91cc\u7684python\u76f8\u5173\u5168\u90e8\u5220\u9664\u5417"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25104523\/e57269f7-674b-445c-a791-bc6c97e10320.webp\" alt=\"\u5982\u4f55\u5c06\u7535\u8111\u91cc\u7684python\u76f8\u5173\u5168\u90e8\u5220\u9664\u5417\" \/><\/p>\n<p><p> <strong>\u8981\u5f7b\u5e95\u5220\u9664\u7535\u8111\u4e2d\u7684Python\u76f8\u5173\u5185\u5bb9\uff0c\u53ef\u4ee5\u901a\u8fc7\u5378\u8f7dPython\u3001\u5220\u9664\u76f8\u5173\u73af\u5883\u53d8\u91cf\u3001\u5220\u9664\u6b8b\u7559\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3001\u4ee5\u53ca\u6e05\u7406\u76f8\u5173\u7684IDE\u548c\u5305\u7ba1\u7406\u5de5\u5177\u7b49\u6b65\u9aa4\u8fdb\u884c\u3002<\/strong> \u9996\u5148\uff0c<strong>\u5378\u8f7dPython<\/strong>\u662f\u5173\u952e\uff0c\u53ef\u4ee5\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5e26\u7684\u5378\u8f7d\u529f\u80fd\u6765\u5b8c\u6210\u3002\u63a5\u4e0b\u6765\uff0c<strong>\u5220\u9664\u73af\u5883\u53d8\u91cf<\/strong>\u4ee5\u786e\u4fdd\u7cfb\u7edf\u8def\u5f84\u4e2d\u4e0d\u518d\u5305\u542bPython\u8def\u5f84\u3002\u4e4b\u540e\uff0c<strong>\u6e05\u7406\u6b8b\u7559\u6587\u4ef6\u548c\u6587\u4ef6\u5939<\/strong>\uff0c\u5305\u62ec\u4e0ePython\u76f8\u5173\u7684\u914d\u7f6e\u6587\u4ef6\u548c\u7f13\u5b58\u6587\u4ef6\u3002\u6700\u540e\uff0c<strong>\u6e05\u7406\u76f8\u5173\u7684IDE\u548c\u5305\u7ba1\u7406\u5de5\u5177<\/strong>\uff0c\u5982PyCharm\u3001Anaconda\u7b49\uff0c\u4ee5\u786e\u4fdd\u6ca1\u6709\u9057\u7559\u7684Python\u73af\u5883\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5378\u8f7dPython<\/h3>\n<\/p>\n<p><h4>1. Windows\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0cPython\u7684\u5378\u8f7d\u6b65\u9aa4\u8f83\u4e3a\u7b80\u5355\u3002\u53ef\u4ee5\u901a\u8fc7\u63a7\u5236\u9762\u677f\u6216\u8bbe\u7f6e\u4e2d\u7684\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u9009\u9879\u6765\u5378\u8f7d\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u63a7\u5236\u9762\u677f\u6216\u8bbe\u7f6e<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6309\u4e0b <code>Win + R<\/code> \u952e\uff0c\u8f93\u5165 <code>control<\/code> \u6253\u5f00\u63a7\u5236\u9762\u677f\u3002<\/li>\n<li>\u6216\u8005\u6309\u4e0b <code>Win + I<\/code> \u952e\uff0c\u8fdb\u5165\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u627e\u5230\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u6216\u201c\u5e94\u7528\u548c\u529f\u80fd\u201d<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728\u63a7\u5236\u9762\u677f\u4e2d\uff0c\u9009\u62e9\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u3002<\/li>\n<li>\u5728\u8bbe\u7f6e\u4e2d\uff0c\u9009\u62e9\u201c\u5e94\u7528\u548c\u529f\u80fd\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u627e\u5230Python<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728\u5217\u8868\u4e2d\u627e\u5230\u201cPython\u201d\u3002<\/li>\n<li>\u6ce8\u610f\uff0c\u5982\u679c\u4f60\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u9700\u8981\u9010\u4e2a\u8fdb\u884c\u5378\u8f7d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5378\u8f7dPython<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9009\u4e2dPython\uff0c\u70b9\u51fb\u201c\u5378\u8f7d\u201d\u6309\u94ae\uff0c\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5378\u8f7d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h4>2. macOS\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728macOS\u7cfb\u7edf\u4e2d\uff0cPython\u7684\u5378\u8f7d\u6b65\u9aa4\u7a0d\u5fae\u590d\u6742\u4e00\u4e9b\uff0c\u56e0\u4e3a\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cmacOS\u81ea\u5e26\u6709Python\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5220\u9664\u81ea\u5b9a\u4e49\u5b89\u88c5\u7684Python<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5982\u679c\u4f60\u662f\u901a\u8fc7\u5b98\u65b9\u5b89\u88c5\u5305\u5b89\u88c5\u7684Python\uff0c\u53ef\u4ee5\u627e\u5230\u5b89\u88c5\u5305\u81ea\u5e26\u7684\u5378\u8f7d\u811a\u672c\uff0c\u901a\u5e38\u4f4d\u4e8e <code>\/Library\/Frameworks\/Python.framework\/Versions\/<\/code> \u4e0b\u3002<\/li>\n<li>\u8fd0\u884c\u5378\u8f7d\u811a\u672c\uff0c\u4f8b\u5982\uff1a<code>sudo rm -rf \/Library\/Frameworks\/Python.framework\/Versions\/3.x\/<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u7684Python<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cmacOS\u81ea\u5e26\u7684Python\u4f4d\u4e8e <code>\/usr\/bin\/python<\/code>\uff0c\u5f3a\u70c8\u4e0d\u5efa\u8bae\u5220\u9664\u7cfb\u7edf\u81ea\u5e26\u7684Python\uff0c\u56e0\u4e3a\u8bb8\u591a\u7cfb\u7edf\u5de5\u5177\u4f9d\u8d56\u5b83\u3002<\/li>\n<li>\u5982\u679c\u786e\u5b9e\u9700\u8981\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>brew<\/code> \u7b49\u5305\u7ba1\u7406\u5de5\u5177\u6765\u7ba1\u7406\u548c\u5220\u9664\u81ea\u5b9a\u4e49\u5b89\u88c5\u7684Python\u7248\u672c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h4>3. Linux\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0cPython\u662f\u4e00\u4e2a\u6838\u5fc3\u7ec4\u4ef6\uff0c\u5378\u8f7d\u9700\u8981\u8c28\u614e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5378\u8f7dPython<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5bf9\u4e8eDebian\/Ubuntu\u7cfb\u7edf\uff0c\u4f7f\u7528 <code>apt-get<\/code> \u547d\u4ee4\uff1a<code>sudo apt-get remove python3<\/code>\u3002<\/li>\n<li>\u5bf9\u4e8eRedHat\/CentOS\u7cfb\u7edf\uff0c\u4f7f\u7528 <code>yum<\/code> \u547d\u4ee4\uff1a<code>sudo yum remove python3<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u624b\u52a8\u5220\u9664Python<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u67e5\u627e\u5e76\u5220\u9664Python\u5b89\u88c5\u76ee\u5f55\uff0c\u4f8b\u5982 <code>\/usr\/local\/lib\/python3.x<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u4e8c\u3001\u5220\u9664\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5220\u9664\u73af\u5883\u53d8\u91cf\u662f\u786e\u4fddPython\u5f7b\u5e95\u4ece\u7cfb\u7edf\u4e2d\u79fb\u9664\u7684\u91cd\u8981\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027\uff1a\u6309\u4e0b <code>Win + R<\/code> \u952e\uff0c\u8f93\u5165 <code>sysdm.cpl<\/code>\u3002<\/li>\n<li>\u9009\u62e9\u201c\u9ad8\u7ea7\u201d\u9009\u9879\u5361\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u6216\u201c\u7528\u6237\u53d8\u91cf\u201d\u4e2d\u67e5\u627e <code>PYTHONPATH<\/code> \u548c <code>PATH<\/code> \u53d8\u91cf\uff0c\u5220\u9664\u4e0ePython\u76f8\u5173\u7684\u8def\u5f84\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>macOS\u548cLinux\u7cfb\u7edf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u7f16\u8f91 <code>~\/.bash_profile<\/code> \u6216 <code>~\/.zshrc<\/code> \u6587\u4ef6\uff1a<code>nano ~\/.bash_profile<\/code>\u3002<\/li>\n<li>\u5220\u9664\u4e0ePython\u76f8\u5173\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u884c\uff0c\u4f8b\u5982 <code>export PATH=&quot;\/usr\/local\/bin\/python3:$PATH&quot;<\/code>\u3002<\/li>\n<li>\u4fdd\u5b58\u5e76\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\uff1a<code>source ~\/.bash_profile<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u4e09\u3001\u6e05\u7406\u6b8b\u7559\u6587\u4ef6\u548c\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><h4>1. Windows\u7cfb\u7edf<\/h4>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5220\u9664Python\u5b89\u88c5\u76ee\u5f55<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u5b89\u88c5\u5728 <code>C:\\PythonXX<\/code>\uff0c\u5220\u9664\u8be5\u6587\u4ef6\u5939\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5220\u9664\u7528\u6237\u76ee\u5f55\u4e0b\u7684Python\u6587\u4ef6<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5220\u9664 <code>C:\\Users\\&lt;\u7528\u6237\u540d&gt;\\AppData\\Local\\Programs\\Python<\/code> \u76ee\u5f55\u3002<\/li>\n<li>\u5220\u9664 <code>C:\\Users\\&lt;\u7528\u6237\u540d&gt;\\AppData\\Local\\pip<\/code> \u76ee\u5f55\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h4>2. macOS\u548cLinux\u7cfb\u7edf<\/h4>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5220\u9664Python\u5b89\u88c5\u76ee\u5f55<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u5b89\u88c5\u5728 <code>\/usr\/local\/lib\/python3.x<\/code> \u6216 <code>\/usr\/local\/bin\/python3<\/code>\uff0c\u5220\u9664\u76f8\u5e94\u6587\u4ef6\u5939\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5220\u9664\u7528\u6237\u76ee\u5f55\u4e0b\u7684Python\u6587\u4ef6<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5220\u9664 <code>~\/.local\/lib\/python3.x<\/code> \u76ee\u5f55\u3002<\/li>\n<li>\u5220\u9664 <code>~\/.cache\/pip<\/code> \u76ee\u5f55\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u56db\u3001\u6e05\u7406\u76f8\u5173\u7684IDE\u548c\u5305\u7ba1\u7406\u5de5\u5177<\/h3>\n<\/p>\n<p><h4>1. PyCharm<\/h4>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5378\u8f7dPyCharm<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7\u63a7\u5236\u9762\u677f\u6216\u8bbe\u7f6e\u4e2d\u7684\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u5378\u8f7dPyCharm\u3002<\/li>\n<li>\u5728macOS\u7cfb\u7edf\u4e2d\uff0c\u5c06PyCharm\u5e94\u7528\u62d6\u52a8\u5230\u5e9f\u7eb8\u7bd3\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5220\u9664PyCharm\u914d\u7f6e\u6587\u4ef6<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>Windows\u7cfb\u7edf\u4e2d\uff0c\u5220\u9664 <code>C:\\Users\\&lt;\u7528\u6237\u540d&gt;\\.PyCharm&lt;\u7248\u672c\u53f7&gt;<\/code> \u76ee\u5f55\u3002<\/li>\n<li>macOS\u7cfb\u7edf\u4e2d\uff0c\u5220\u9664 <code>~\/Library\/Preferences\/PyCharm&lt;\u7248\u672c\u53f7&gt;<\/code> \u76ee\u5f55\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h4>2. Anaconda<\/h4>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5378\u8f7dAnaconda<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>Windows\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7\u63a7\u5236\u9762\u677f\u6216\u8bbe\u7f6e\u4e2d\u7684\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u5378\u8f7dAnaconda\u3002<\/li>\n<li>macOS\u548cLinux\u7cfb\u7edf\u4e2d\uff0c\u8fd0\u884c <code>anaconda-clean<\/code> \u547d\u4ee4\uff0c\u7136\u540e\u5220\u9664Anaconda\u76ee\u5f55\uff1a<code>rm -rf ~\/anaconda3<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5220\u9664\u73af\u5883\u53d8\u91cf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5220\u9664\u4e0eAnaconda\u76f8\u5173\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u884c\uff0c\u4f8b\u5982 <code>export PATH=&quot;\/Users\/&lt;\u7528\u6237\u540d&gt;\/anaconda3\/bin:$PATH&quot;<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001\u68c0\u67e5\u548c\u9a8c\u8bc1<\/h3>\n<\/p>\n<p><h4>1. \u68c0\u67e5Python\u662f\u5426\u5b8c\u5168\u5378\u8f7d<\/h4>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5Python\u547d\u4ee4<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u8f93\u5165 <code>python<\/code> \u548c <code>python3<\/code>\uff0c\u786e\u8ba4\u547d\u4ee4\u4e0d\u53ef\u7528\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u68c0\u67e5\u73af\u5883\u53d8\u91cf<\/strong>\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u786e\u8ba4\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u4e0d\u518d\u5305\u542bPython\u76f8\u5173\u8def\u5f84\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><h4>2. \u68c0\u67e5\u76f8\u5173\u5de5\u5177\u548cIDE<\/h4>\n<\/p>\n<ol>\n<li><strong>\u68c0\u67e5PyCharm\u548cAnaconda<\/strong>\uff1a\n<ul>\n<li>\u786e\u8ba4PyCharm\u548cAnaconda\u5df2\u5b8c\u5168\u5378\u8f7d\uff0c\u76f8\u5173\u914d\u7f6e\u6587\u4ef6\u5df2\u5220\u9664\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5f7b\u5e95\u5220\u9664\u7535\u8111\u4e2d\u7684Python\u76f8\u5173\u5185\u5bb9\uff0c\u786e\u4fdd\u7cfb\u7edf\u73af\u5883\u5e72\u51c0\u65e0\u6b8b\u7559\u3002\u5982\u679c\u4f60\u4ee5\u540e\u9700\u8981\u91cd\u65b0\u5b89\u88c5Python\uff0c\u5efa\u8bae\u6309\u7167\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u5b89\u88c5\u914d\u7f6e\uff0c\u4ee5\u907f\u514d\u73af\u5883\u51b2\u7a81\u548c\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u8ba4\u7535\u8111\u4e2d\u5b89\u88c5\u7684Python\u7248\u672c\u548c\u76f8\u5173\u7ec4\u4ef6\uff1f<\/strong><br \/>\u5728\u5220\u9664Python\u4e4b\u524d\uff0c\u4e86\u89e3\u5f53\u524d\u5b89\u88c5\u7684\u7248\u672c\u548c\u76f8\u5173\u7ec4\u4ef6\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08macOS\/Linux\uff09\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u67e5\u770b\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u6b64\u5916\uff0c\u68c0\u67e5\u7cfb\u7edf\u7684\u7a0b\u5e8f\u548c\u529f\u80fd\u5217\u8868\uff0c\u4e86\u89e3\u662f\u5426\u5b89\u88c5\u4e86\u5176\u4ed6Python\u76f8\u5173\u7684\u5e93\u548c\u5de5\u5177\uff0c\u5982Anaconda\u6216pip\u3002<\/p>\n<p><strong>\u5220\u9664Python\u540e\u4f1a\u5f71\u54cd\u54ea\u4e9b\u7a0b\u5e8f\u6216\u9879\u76ee\uff1f<\/strong><br \/>\u5982\u679c\u7535\u8111\u4e2d\u6709\u4f9d\u8d56\u4e8ePython\u7684\u5e94\u7528\u7a0b\u5e8f\u6216\u9879\u76ee\uff0c\u5220\u9664Python\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8fd9\u4e9b\u7a0b\u5e8f\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u3002\u5728\u8fdb\u884c\u5220\u9664\u64cd\u4f5c\u524d\uff0c\u5efa\u8bae\u5907\u4efd\u91cd\u8981\u7684\u9879\u76ee\u6587\u4ef6\u548c\u914d\u7f6e\u3002\u68c0\u67e5\u662f\u5426\u6709\u5176\u4ed6\u8f6f\u4ef6\u4f9d\u8d56\u4e8ePython\uff0c\u5c24\u5176\u662f\u5728\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6216Web\u5f00\u53d1\u7b49\u9886\u57df\u3002<\/p>\n<p><strong>\u5220\u9664Python\u540e\u5982\u4f55\u91cd\u65b0\u5b89\u88c5\u5e76\u786e\u4fdd\u73af\u5883\u5e72\u51c0\uff1f<\/strong><br \/>\u5728\u5220\u9664Python\u540e\uff0c\u786e\u4fdd\u7cfb\u7edf\u73af\u5883\u5e72\u51c0\u81f3\u5173\u91cd\u8981\u3002\u53ef\u4ee5\u901a\u8fc7\u5220\u9664Python\u5b89\u88c5\u76ee\u5f55\u53ca\u5176\u76f8\u5173\u7684\u7528\u6237\u6587\u4ef6\u5939\uff08\u5982<code>.pyenv<\/code>\u6216<code>~\/.local<\/code>\u7b49\uff09\u6765\u6e05\u7406\u3002\u91cd\u65b0\u5b89\u88c5\u65f6\uff0c\u5efa\u8bae\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\uff0c\u786e\u4fdd\u9009\u62e9\u5408\u9002\u7684\u5b89\u88c5\u9009\u9879\uff0c\u5982\u201cAdd Python to PATH\u201d\u3002\u8fd8\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u865a\u62df\u73af\u5883\u5de5\u5177\uff08\u5982venv\u6216virtualenv\uff09\u6765\u7ba1\u7406\u4e0d\u540c\u9879\u76ee\u6240\u9700\u7684Python\u7248\u672c\u548c\u4f9d\u8d56\uff0c\u907f\u514d\u672a\u6765\u53ef\u80fd\u51fa\u73b0\u7684\u51b2\u7a81\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5f7b\u5e95\u5220\u9664\u7535\u8111\u4e2d\u7684Python\u76f8\u5173\u5185\u5bb9\uff0c\u53ef\u4ee5\u901a\u8fc7\u5378\u8f7dPython\u3001\u5220\u9664\u76f8\u5173\u73af\u5883\u53d8\u91cf\u3001\u5220\u9664\u6b8b\u7559\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3001\u4ee5\u53ca [&hellip;]","protected":false},"author":3,"featured_media":1136043,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1136039"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1136039"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1136039\/revisions"}],"predecessor-version":[{"id":1136045,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1136039\/revisions\/1136045"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1136043"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1136039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1136039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1136039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}