{"id":922531,"date":"2024-12-26T14:33:08","date_gmt":"2024-12-26T06:33:08","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/922531.html"},"modified":"2024-12-26T14:33:10","modified_gmt":"2024-12-26T06:33:10","slug":"python-%e5%a6%82%e4%bd%95%e6%b7%bb%e5%8a%a0%e6%a8%a1%e5%9d%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/922531.html","title":{"rendered":"python \u5982\u4f55\u6dfb\u52a0\u6a21\u5757"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211001\/e841a6ee-2157-4bb4-a382-bef51c462c24.webp\" alt=\"python \u5982\u4f55\u6dfb\u52a0\u6a21\u5757\" \/><\/p>\n<p><p> <strong>Python\u6dfb\u52a0\u6a21\u5757\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pip\u5b89\u88c5\u3001\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u3001\u901a\u8fc7\u6e90\u7801\u5b89\u88c5\u3002<\/strong>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u4f1a\u4f18\u5148\u9009\u62e9\u4f7f\u7528pip\u5b89\u88c5\uff0c\u56e0\u4e3a\u5b83\u662fPython\u5b98\u65b9\u63a8\u8350\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u80fd\u591f\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u5e76\u4e14\u65b9\u4fbf\u5feb\u6377\u3002\u4ee5\u4e0b\u5c06\u5bf9\u4f7f\u7528pip\u5b89\u88c5\u6a21\u5757\u8fd9\u4e00\u65b9\u6cd5\u8fdb\u884c\u8be6\u7ec6\u63cf\u8ff0\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5\u6a21\u5757\u662f\u6700\u5e38\u89c1\u4e14\u6700\u65b9\u4fbf\u7684\u65b9\u6cd5\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86pip\u5de5\u5177\uff0c\u8fd9\u901a\u5e38\u5728Python\u5b89\u88c5\u65f6\u4f1a\u9ed8\u8ba4\u5b89\u88c5\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c<code>pip --version<\/code>\u547d\u4ee4\u6765\u786e\u8ba4\u5176\u662f\u5426\u53ef\u7528\u3002\u63a5\u4e0b\u6765\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528<code>pip install \u6a21\u5757\u540d<\/code>\u547d\u4ee4\u5373\u53ef\u5b89\u88c5\u6a21\u5757\u3002pip\u4f1a\u81ea\u52a8\u4ecePython\u7684\u5b98\u65b9\u5305\u7ba1\u7406\u5e73\u53f0PyPI\uff08Python Package Index\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5\u6a21\u5757\u53ca\u5176\u4f9d\u8d56\u9879\u3002\u8fd9\u6837\uff0c\u4f60\u4e0d\u9700\u8981\u624b\u52a8\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\uff0c\u5927\u5927\u7b80\u5316\u4e86\u6a21\u5757\u7684\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001\u4f7f\u7528PIP\u5b89\u88c5\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5\u662fPython\u4e2d\u6700\u4e3a\u63a8\u8350\u7684\u65b9\u5f0f\u3002pip\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u4e0b\u8f7d\u5b89\u88c5Python\u5305\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528pip\u5b89\u88c5\u6a21\u5757\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5pip\u662f\u5426\u5df2\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u68c0\u67e5pip\u662f\u5426\u5df2\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u5df2\u5b89\u88c5\uff0c\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c<code>pip 21.0.1 from \/path\/to\/python\/site-packages (python 3.9)<\/code>\u7684\u8f93\u51fa\u3002\u5982\u679c\u672a\u5b89\u88c5\uff0c\u4f60\u9700\u8981\u5148\u5b89\u88c5pip\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u6240\u9700\u7684Python\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install \u6a21\u5757\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5b89\u88c5requests\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u81ea\u52a8\u4e0b\u8f7d\u548c\u5b89\u88c5requests\u6a21\u5757\u53ca\u5176\u6240\u6709\u4f9d\u8d56\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5347\u7ea7\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5347\u7ea7\u5df2\u5b89\u88c5\u7684\u6a21\u5757\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade \u6a21\u5757\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5347\u7ea7requests\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5378\u8f7d\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5378\u8f7d\u67d0\u4e2a\u6a21\u5757\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip uninstall \u6a21\u5757\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u5378\u8f7drequests\u6a21\u5757\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip uninstall requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u67d0\u4e2a\u6a21\u5757\uff0c\u6bd4\u5982\u5728\u6ca1\u6709\u7f51\u7edc\u8fde\u63a5\u7684\u73af\u5883\u4e2d\u3002\u4ee5\u4e0b\u662f\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u6a21\u5757\u7684\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\u4ecePyPI\u6216\u5176\u4ed6\u53ef\u4fe1\u6765\u6e90\u4e0b\u8f7d\u6240\u9700\u6a21\u5757\u7684\u538b\u7f29\u5305\uff08\u901a\u5e38\u4e3atar.gz\u6216zip\u683c\u5f0f\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u538b\u7f29\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u5c06\u4e0b\u8f7d\u7684\u538b\u7f29\u5305\u89e3\u538b\u5230\u4f60\u9009\u62e9\u7684\u76ee\u5f55\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fdb\u5165\u89e3\u538b\u540e\u7684\u76ee\u5f55\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5b89\u88c5\u6a21\u5757\u5230\u4f60\u7684Python\u73af\u5883\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u901a\u8fc7\u6e90\u7801\u5b89\u88c5\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u67d0\u4e9b\u6a21\u5757\u53ef\u80fd\u9700\u8981\u4ece\u6e90\u7801\u8fdb\u884c\u5b89\u88c5\u3002\u8fd9\u901a\u5e38\u6d89\u53ca\u5230\u7f16\u8bd1\u6e90\u4ee3\u7801\uff0c\u5e76\u4e14\u53ef\u80fd\u9700\u8981\u6ee1\u8db3\u4e00\u5b9a\u7684\u7cfb\u7edf\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u6e90\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u4ece\u6a21\u5757\u7684\u5b98\u65b9\u4ed3\u5e93\uff08\u4f8b\u5982GitHub\uff09\u514b\u9686\u6216\u4e0b\u8f7d\u6e90\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u6839\u636e\u6a21\u5757\u7684\u5b89\u88c5\u6587\u6863\uff0c\u914d\u7f6e\u6240\u9700\u7684\u73af\u5883\u53d8\u91cf\u548c\u4f9d\u8d56\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u8bd1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u6e90\u7801\u76ee\u5f55\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python setup.py build<\/p>\n<p>python setup.py install<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u4f7f\u7528\u4f60\u7684Python\u89e3\u91ca\u5668\u7f16\u8bd1\u548c\u5b89\u88c5\u6a21\u5757\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u7ba1\u7406\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5927\u578b\u9879\u76ee\u4e2d\uff0c\u901a\u5e38\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u865a\u62df\u73af\u5883\u53ef\u4ee5\u4e3a\u9879\u76ee\u63d0\u4f9b\u72ec\u7acb\u7684Python\u73af\u5883\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\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<p><p>\u8fd9\u5c06\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>myenv<\/code>\u7684\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u6839\u636e\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>Windows\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>MacOS\/Linux\uff1a<\/p>\n<\/p>\n<p><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>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u6a21\u5757<\/strong><\/p>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u4f7f\u7528pip\u5b89\u88c5\u6a21\u5757\u5c06\u53ea\u5f71\u54cd\u8be5\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install \u6a21\u5757\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9000\u51fa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u6a21\u5757\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6743\u9650\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9047\u5230\u6743\u9650\u9519\u8bef\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884cpip\u547d\u4ee4\uff0c\u6216\u5728Unix\u7cfb\u7edf\u4e0a\u4f7f\u7528sudo\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo pip install \u6a21\u5757\u540d<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f51\u7edc\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u65e0\u6cd5\u4ecePyPI\u4e0b\u8f7d\u6a21\u5757\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u66f4\u6362\u4e3a\u56fd\u5185\u955c\u50cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install \u6a21\u5757\u540d -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f9d\u8d56\u51b2\u7a81<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u9047\u5230\u4f9d\u8d56\u51b2\u7a81\uff0c\u53ef\u80fd\u9700\u8981\u624b\u52a8\u5378\u8f7d\u51b2\u7a81\u7684\u6a21\u5757\u6216\u7248\u672c\uff0c\u5e76\u91cd\u65b0\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u548c\u6280\u5de7\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u5728Python\u4e2d\u6dfb\u52a0\u548c\u7ba1\u7406\u6a21\u5757\uff0c\u4ece\u800c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u3002\u65e0\u8bba\u662f\u901a\u8fc7pip\u5b89\u88c5\u3001\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\uff0c\u8fd8\u662f\u901a\u8fc7\u6e90\u7801\u5b89\u88c5\uff0c\u4f60\u90fd\u80fd\u7075\u6d3b\u5730\u9009\u62e9\u6700\u9002\u5408\u4f60\u9879\u76ee\u9700\u6c42\u7684\u65b9\u6cd5\u3002\u540c\u65f6\uff0c\u4e86\u89e3\u5982\u4f55\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5\u7b2c\u4e09\u65b9\u6a21\u5757\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b89\u88c5\u7b2c\u4e09\u65b9\u6a21\u5757\u901a\u5e38\u4f7f\u7528pip\u5de5\u5177\u3002\u9996\u5148\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\uff0c\u8f93\u5165<code>pip install \u6a21\u5757\u540d<\/code>\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u60f3\u5b89\u88c5requests\u6a21\u5757\uff0c\u53ef\u4ee5\u8f93\u5165<code>pip install requests<\/code>\u3002\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u548cpip\uff0c\u5e76\u5728\u547d\u4ee4\u884c\u4e2d\u53ef\u7528\u3002<\/p>\n<p><strong>\u5982\u679c\u6211\u60f3\u6dfb\u52a0\u672c\u5730\u6a21\u5757\uff0c\u8be5\u600e\u4e48\u505a\uff1f<\/strong><br \/>\u8981\u6dfb\u52a0\u672c\u5730\u6a21\u5757\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u6216\u7edd\u5bf9\u8def\u5f84\u5bfc\u5165\u6a21\u5757\u3002\u5982\u679c\u6a21\u5757\u6587\u4ef6\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<code>import \u6a21\u5757\u540d<\/code>\u3002\u5982\u679c\u6a21\u5757\u4e0d\u5728\u5f53\u524d\u76ee\u5f55\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sys.path.append(&#39;\u6a21\u5757\u6240\u5728\u8def\u5f84&#39;)<\/code>\u6765\u6dfb\u52a0\u8be5\u8def\u5f84\uff0c\u7136\u540e\u5bfc\u5165\u6a21\u5757\u3002<\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b\u5df2\u5b89\u88c5\u7684Python\u6a21\u5757\u5217\u8868\uff1f<\/strong><br \/>\u8981\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u6a21\u5757\u5217\u8868\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>pip list<\/code>\uff0c\u8fd9\u5c06\u663e\u793a\u6240\u6709\u5df2\u5b89\u88c5\u7684\u6a21\u5757\u53ca\u5176\u7248\u672c\u53f7\u3002\u5982\u679c\u60a8\u5e0c\u671b\u83b7\u5f97\u66f4\u8be6\u7ec6\u7684\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pip show \u6a21\u5757\u540d<\/code>\uff0c\u8fd9\u5c06\u63d0\u4f9b\u5173\u4e8e\u7279\u5b9a\u6a21\u5757\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u5176\u5b89\u88c5\u4f4d\u7f6e\u548c\u4f9d\u8d56\u9879\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u6dfb\u52a0\u6a21\u5757\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528pip\u5b89\u88c5\u3001\u624b\u52a8\u4e0b\u8f7d\u5b89\u88c5\u3001\u901a\u8fc7\u6e90\u7801\u5b89\u88c5\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u4f1a\u4f18\u5148\u9009\u62e9\u4f7f\u7528pi [&hellip;]","protected":false},"author":3,"featured_media":922533,"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\/922531"}],"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=922531"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922531\/revisions"}],"predecessor-version":[{"id":922534,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/922531\/revisions\/922534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/922533"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=922531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=922531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=922531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}