{"id":925595,"date":"2024-12-26T15:33:37","date_gmt":"2024-12-26T07:33:37","guid":{"rendered":""},"modified":"2024-12-26T15:33:40","modified_gmt":"2024-12-26T07:33:40","slug":"%e5%a6%82%e4%bd%95%e6%90%ad%e5%bb%bapython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/925595.html","title":{"rendered":"\u5982\u4f55\u642d\u5efapython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212719\/25483bbe-28a9-4a25-9147-468ade27a9f4.webp\" alt=\"\u5982\u4f55\u642d\u5efapython\" \/><\/p>\n<p><p> <strong>\u642d\u5efaPython\u7684\u8fc7\u7a0b\u6d89\u53ca\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u8bbe\u7f6e\u5f00\u53d1\u73af\u5883\u3001\u9009\u62e9\u5408\u9002\u7684IDE\u6216\u6587\u672c\u7f16\u8f91\u5668\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u548c\u5305\u3001\u4ee5\u53ca\u914d\u7f6e\u865a\u62df\u73af\u5883\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u5efa\u8bae\u4f7f\u7528Anaconda\u8fdb\u884c\u5b89\u88c5\uff0c\u56e0\u4e3a\u5b83\u96c6\u6210\u4e86Python\u548c\u5e38\u7528\u7684\u6570\u636e\u79d1\u5b66\u5305\uff0c\u7b80\u5316\u4e86\u521d\u671f\u914d\u7f6e\u7684\u590d\u6742\u6027\u3002<\/strong> Anaconda\u63d0\u4f9b\u4e86\u4e00\u4e2a\u540d\u4e3aConda\u7684\u5305\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u4ee5\u8f7b\u677e\u7ba1\u7406\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u9879\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u63cf\u8ff0\u642d\u5efaPython\u5f00\u53d1\u73af\u5883\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>\u5728\u642d\u5efaPython\u5f00\u53d1\u73af\u5883\u7684\u7b2c\u4e00\u6b65\u5c31\u662f\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002Python\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u63d0\u4f9b\u4e86\u9002\u7528\u4e8eWindows\u3001macOS\u548cLinux\u7684\u5b89\u88c5\u5305\u3002\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/strong>\uff1a\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002Windows\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d.exe\u6587\u4ef6\uff0c\u800cmacOS\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d.pkg\u6587\u4ef6\u3002Linux\u7528\u6237\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5b89\u88c5Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/strong>\uff1a\u8fd0\u884c\u4e0b\u8f7d\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u4f7f\u60a8\u80fd\u591f\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong>\uff1a\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08macOS\/Linux\uff09\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u4ee5\u786e\u8ba4Python\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u8bbe\u7f6e\u5f00\u53d1\u73af\u5883<\/p>\n<\/p>\n<p><p>\u8bbe\u7f6e\u4e00\u4e2a\u6709\u6548\u7684\u5f00\u53d1\u73af\u5883\u662f\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u5de5\u5177\u548c\u914d\u7f6e\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9009\u62e9\u5408\u9002\u7684IDE\u6216\u6587\u672c\u7f16\u8f91\u5668<\/strong>\uff1aPython\u6709\u8bb8\u591a\u6d41\u884c\u7684IDE\u548c\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5982PyCharm\u3001Visual Studio Code\u3001Sublime Text\u548cAtom\u3002PyCharm\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u8c03\u8bd5\u548c\u4ee3\u7801\u5206\u6790\u5de5\u5177\uff0c\u800cVisual Studio Code\u5219\u56e0\u5176\u63d2\u4ef6\u4e30\u5bcc\u548c\u8f7b\u91cf\u7ea7\u5e7f\u53d7\u6b22\u8fce\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u5fc5\u8981\u7684\u63d2\u4ef6<\/strong>\uff1a\u6839\u636e\u60a8\u9009\u62e9\u7684IDE\u6216\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5b89\u88c5\u76f8\u5173\u7684Python\u63d2\u4ef6\u4ee5\u589e\u5f3a\u4ee3\u7801\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6ePython\u89e3\u91ca\u5668<\/strong>\uff1a\u5728\u60a8\u7684IDE\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668\u8def\u5f84\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u53ef\u4ee5\u6b63\u786e\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528Anaconda\u8fdb\u884c\u73af\u5883\u7ba1\u7406<\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u79cd\u6d41\u884c\u7684Python\u53d1\u884c\u7248\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u3002\u5b83\u4e0d\u4ec5\u5305\u542b\u4e86Python\uff0c\u8fd8\u96c6\u6210\u4e86\u8bb8\u591a\u5e38\u7528\u7684\u6570\u636e\u79d1\u5b66\u5e93\u548c\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u5e76\u5b89\u88c5Anaconda<\/strong>\uff1a\u8bbf\u95eeAnaconda\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u7b80\u5355\uff0c\u8ddf\u968f\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Conda\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong>\uff1a\u865a\u62df\u73af\u5883\u5141\u8bb8\u60a8\u4e3a\u4e0d\u540c\u9879\u76ee\u7ef4\u62a4\u72ec\u7acb\u7684\u5305\u4f9d\u8d56\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u548c\u6fc0\u6d3b\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda create --name myenv python=3.8<\/p>\n<p>conda activate myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u548c\u5305<\/strong>\uff1a\u4f7f\u7528Conda\u6216pip\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u5e93\u3002\u4f8b\u5982\uff0c\u5b89\u88c5NumPy\u548cPandas\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">conda install numpy pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u914d\u7f6e\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u865a\u62df\u73af\u5883\u662fPython\u5f00\u53d1\u4e2d\u4e00\u4e2a\u91cd\u8981\u7684\u6982\u5ff5\uff0c\u7279\u522b\u662f\u5728\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56\u65f6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong>\uff1a\u9664\u4e86\u4f7f\u7528Conda\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>venv<\/code>\u6a21\u5757\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong>\uff1a\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff0c\u4ee5\u4fbf\u5728\u8be5\u73af\u5883\u4e2d\u5b89\u88c5\u5305\u548c\u8fd0\u884cPython\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<ul>\n<li>Windows:\n<pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>macOS\/Linux:\n<pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7ba1\u7406\u4f9d\u8d56\u9879<\/strong>\uff1a\u5728\u865a\u62df\u73af\u5883\u4e2d\u4f7f\u7528pip\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff0c\u5e76\u4f7f\u7528<code>requirements.txt<\/code>\u6587\u4ef6\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u6b64\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip freeze &gt; requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u9879\u76ee\u7ed3\u6784\u548c\u7248\u672c\u63a7\u5236<\/p>\n<\/p>\n<p><p>\u826f\u597d\u7684\u9879\u76ee\u7ed3\u6784\u548c\u7248\u672c\u63a7\u5236\u662fPython\u5f00\u53d1\u7684\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7ec4\u7ec7\u9879\u76ee\u7ed3\u6784<\/strong>\uff1a\u4f7f\u7528\u6807\u51c6\u7684\u9879\u76ee\u7ed3\u6784\u6765\u7ec4\u7ec7\u4ee3\u7801\u3001\u6d4b\u8bd5\u3001\u6587\u6863\u548c\u914d\u7f6e\u6587\u4ef6\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code>my_project\/<\/p>\n<p>    \u251c\u2500\u2500 my_package\/<\/p>\n<p>    \u2502   \u251c\u2500\u2500 __init__.py<\/p>\n<p>    \u2502   \u251c\u2500\u2500 module1.py<\/p>\n<p>    \u2502   \u2514\u2500\u2500 module2.py<\/p>\n<p>    \u251c\u2500\u2500 tests\/<\/p>\n<p>    \u251c\u2500\u2500 README.md<\/p>\n<p>    \u251c\u2500\u2500 setup.py<\/p>\n<p>    \u2514\u2500\u2500 requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Git\u8fdb\u884c\u7248\u672c\u63a7\u5236<\/strong>\uff1aGit\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8ddf\u8e2a\u4ee3\u7801\u53d8\u5316\u5e76\u4e0e\u56e2\u961f\u534f\u4f5c\u3002\u521b\u5efa\u4e00\u4e2aGit\u4ed3\u5e93\u5e76\u5b9a\u671f\u63d0\u4ea4\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u6d4b\u8bd5\u548c\u8c03\u8bd5<\/p>\n<\/p>\n<p><p>\u6d4b\u8bd5\u548c\u8c03\u8bd5\u662f\u786e\u4fdd\u4ee3\u7801\u8d28\u91cf\u548c\u529f\u80fd\u6b63\u786e\u7684\u91cd\u8981\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b<\/strong>\uff1a\u4f7f\u7528unittest\u6216pytest\u7b49\u6846\u67b6\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u9a8c\u8bc1\u4ee3\u7801\u7684\u529f\u80fd\u548c\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177<\/strong>\uff1a\u5728IDE\u4e2d\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\u8bbe\u7f6e\u65ad\u70b9\uff0c\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u4ee5\u67e5\u627e\u548c\u4fee\u590d\u9519\u8bef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6301\u7eed\u96c6\u6210<\/strong>\uff1a\u5c06\u6d4b\u8bd5\u96c6\u6210\u5230\u6301\u7eed\u96c6\u6210\uff08CI\uff09\u6d41\u6c34\u7ebf\u4e2d\uff0c\u4ee5\u4fbf\u5728\u6bcf\u6b21\u4ee3\u7801\u53d8\u66f4\u65f6\u81ea\u52a8\u8fd0\u884c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u6253\u5305\u548c\u90e8\u7f72<\/p>\n<\/p>\n<p><p>\u5f53\u9879\u76ee\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u6253\u5305\u548c\u90e8\u7f72\u662f\u5c06\u5e94\u7528\u7a0b\u5e8f\u4ea4\u4ed8\u7ed9\u7528\u6237\u7684\u5173\u952e\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528setuptools\u6253\u5305\u9879\u76ee<\/strong>\uff1a\u4f7f\u7528setuptools\u7f16\u5199setup.py\u6587\u4ef6\uff0c\u5b9a\u4e49\u9879\u76ee\u7684\u5143\u6570\u636e\u548c\u4f9d\u8d56\u9879\u3002\u7136\u540e\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6253\u5305\u9879\u76ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py sdist bdist_wheel<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u53d1\u5e03\u5230PyPI<\/strong>\uff1a\u5c06\u5305\u4e0a\u4f20\u5230Python Package Index (PyPI)\uff0c\u4ee5\u4fbf\u5176\u4ed6\u7528\u6237\u53ef\u4ee5\u5b89\u88c5\u548c\u4f7f\u7528\u3002\u4f7f\u7528twine\u5de5\u5177\u4e0a\u4f20\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">twine upload dist\/*<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u90e8\u7f72\u5230\u751f\u4ea7\u73af\u5883<\/strong>\uff1a\u6839\u636e\u5e94\u7528\u7684\u6027\u8d28\uff0c\u9009\u62e9\u5408\u9002\u7684\u90e8\u7f72\u65b9\u5f0f\uff0c\u4f8b\u5982\u5728\u4e91\u5e73\u53f0\u4e0a\u90e8\u7f72Web\u5e94\u7528\u6216\u5728\u672c\u5730\u8fd0\u884c\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u6210\u529f\u642d\u5efa\u4e00\u4e2a\u9ad8\u6548\u7684Python\u5f00\u53d1\u73af\u5883\uff0c\u5e76\u4e3a\u9879\u76ee\u5f00\u53d1\u3001\u6d4b\u8bd5\u548c\u90e8\u7f72\u6253\u4e0b\u575a\u5b9e\u7684\u57fa\u7840\u3002\u65e0\u8bba\u60a8\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0c\u9075\u5faa\u8fd9\u4e9b\u6700\u4f73\u5b9e\u8df5\u5c06\u6709\u52a9\u4e8e\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u8fdb\u884c\u642d\u5efa\uff1f<\/strong><br \/>\u9009\u62e9Python\u7248\u672c\u65f6\uff0c\u5efa\u8bae\u6839\u636e\u9879\u76ee\u9700\u6c42\u548c\u4f9d\u8d56\u5e93\u7684\u517c\u5bb9\u6027\u6765\u51b3\u5b9a\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u4f1a\u5305\u542b\u66f4\u591a\u7684\u529f\u80fd\u548c\u5b89\u5168\u6027\u66f4\u65b0\uff0c\u4f46\u67d0\u4e9b\u65e7\u7684\u5e93\u53ef\u80fd\u53ea\u652f\u6301\u7279\u5b9a\u7684\u7248\u672c\u3002\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff0c\u67e5\u770b\u5404\u7248\u672c\u7684\u6587\u6863\u548c\u66f4\u65b0\u8bb0\u5f55\uff0c\u4ee5\u5e2e\u52a9\u4f60\u505a\u51fa\u660e\u667a\u7684\u9009\u62e9\u3002<\/p>\n<p><strong>\u5728Windows\u7cfb\u7edf\u4e0a\u642d\u5efaPython\u73af\u5883\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728Windows\u4e0a\u642d\u5efaPython\u65f6\uff0c\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002\u6b64\u5916\uff0c\u5efa\u8bae\u4f7f\u7528\u865a\u62df\u73af\u5883\u5de5\u5177\uff08\u5982venv\u6216virtualenv\uff09\u6765\u9694\u79bb\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\uff0c\u907f\u514d\u51b2\u7a81\u3002<\/p>\n<p><strong>\u5982\u4f55\u6709\u6548\u7ba1\u7406Python\u9879\u76ee\u7684\u4f9d\u8d56\u5e93\uff1f<\/strong><br \/>\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5982pip\u6765\u5b89\u88c5\u548c\u7ba1\u7406\u4f9d\u8d56\u5e93\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u901a\u8fc7\u521b\u5efa<code>requirements.txt<\/code>\u6587\u4ef6\uff0c\u53ef\u4ee5\u8bb0\u5f55\u9879\u76ee\u6240\u9700\u7684\u6240\u6709\u5e93\u53ca\u5176\u7248\u672c\uff0c\u4fbf\u4e8e\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u5feb\u901f\u91cd\u73b0\u76f8\u540c\u7684\u5f00\u53d1\u73af\u5883\u3002\u5229\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u786e\u4fdd\u6bcf\u4e2a\u9879\u76ee\u4f7f\u7528\u72ec\u7acb\u7684\u4f9d\u8d56\u5e93\uff0c\u9632\u6b62\u5168\u5c40\u73af\u5883\u7684\u5e72\u6270\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u642d\u5efaPython\u7684\u8fc7\u7a0b\u6d89\u53ca\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u8bbe\u7f6e\u5f00\u53d1\u73af\u5883\u3001\u9009\u62e9\u5408\u9002\u7684IDE\u6216\u6587\u672c\u7f16\u8f91\u5668\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u548c\u5305 [&hellip;]","protected":false},"author":3,"featured_media":925600,"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\/925595"}],"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=925595"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/925595\/revisions"}],"predecessor-version":[{"id":925601,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/925595\/revisions\/925601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/925600"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=925595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=925595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=925595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}