{"id":986386,"date":"2024-12-27T07:44:32","date_gmt":"2024-12-26T23:44:32","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/986386.html"},"modified":"2024-12-27T07:44:34","modified_gmt":"2024-12-26T23:44:34","slug":"%e5%9c%a8%e5%86%85%e7%bd%91%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/986386.html","title":{"rendered":"\u5728\u5185\u7f51\u5982\u4f55\u4f7f\u7528python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25063012\/bd43c908-2798-47fd-bc06-a4df8f8d0707.webp\" alt=\"\u5728\u5185\u7f51\u5982\u4f55\u4f7f\u7528python\" \/><\/p>\n<p><p> \u5728\u5185\u7f51\u4f7f\u7528Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u5185\u7f51\u73af\u5883\u7684\u9700\u6c42\u548c\u9650\u5236\u3002<strong>\u5185\u7f51\u73af\u5883\u4e2d\u4f7f\u7528Python\u7684\u5173\u952e\u65b9\u6cd5\u5305\u62ec\uff1a\u8bbe\u7f6ePython\u5f00\u53d1\u73af\u5883\u3001\u4f7f\u7528\u672c\u5730\u5305\u7ba1\u7406\u5668\u3001\u901a\u8fc7\u5185\u7f51<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5de5\u5177\u5171\u4eab\u4ee3\u7801\u3001\u5229\u7528\u7f51\u7edc\u4ee3\u7406\u8bbf\u95ee\u5916\u90e8\u8d44\u6e90<\/strong>\u3002\u5176\u4e2d\uff0c\u8bbe\u7f6ePython\u5f00\u53d1\u73af\u5883\u662f\u6700\u57fa\u7840\u7684\u4e00\u6b65\uff0c\u901a\u8fc7\u5b89\u88c5\u548c\u914d\u7f6ePython\u89e3\u91ca\u5668\u4e0e\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u53ef\u4ee5\u5728\u5185\u7f51\u73af\u5883\u4e2d\u9ad8\u6548\u5730\u8fdb\u884cPython\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u8bbe\u7f6ePython\u5f00\u53d1\u73af\u5883\u662f\u4f7f\u7528Python\u7684\u57fa\u7840\u6b65\u9aa4\u3002\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\uff0c\u53ef\u4ee5\u4ecePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u76f8\u5e94\u7248\u672c\u7684\u5b89\u88c5\u5305\uff0c\u5e76\u6839\u636e\u5185\u7f51\u7684\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u914d\u7f6e\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u5982PyCharm\u3001Visual Studio Code\u7b49\uff0c\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u548c\u8c03\u8bd5\u529f\u80fd\uff0c\u80fd\u591f\u663e\u8457\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002\u5728\u5185\u7f51\u4e2d\uff0c\u53ef\u80fd\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u83b7\u53d6\u8fd9\u4e9b\u5de5\u5177\uff0c\u56e0\u6b64\u53ef\u4ee5\u901a\u8fc7USB\u8bbe\u5907\u6216\u5185\u7f51\u5171\u4eab\u670d\u52a1\u8fdb\u884c\u8f6f\u4ef6\u5206\u53d1\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u8bbe\u7f6ePython\u5f00\u53d1\u73af\u5883<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u5728\u5185\u7f51\u4e2d\u4f7f\u7528Python\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u548c\u914d\u7f6ePython\u7684\u5f00\u53d1\u73af\u5883\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u5305\u62ec\u5b89\u88c5Python\u89e3\u91ca\u5668\u548c\u9009\u62e9\u5408\u9002\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002<\/p>\n<\/p>\n<p><h4>1.1 \u5b89\u88c5Python\u89e3\u91ca\u5668<\/h4>\n<\/p>\n<p><p>Python\u89e3\u91ca\u5668\u662f\u8fd0\u884cPython\u4ee3\u7801\u7684\u57fa\u7840\u3002\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u901a\u5e38\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u4e92\u8054\u7f51\u4e0b\u8f7d\u8f6f\u4ef6\uff0c\u8fd9\u65f6\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u83b7\u53d6Python\u5b89\u88c5\u5305\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u901a\u8fc7\u5916\u90e8\u8bbe\u5907\u4f20\u8f93<\/strong>\uff1a\u53ef\u4ee5\u5728\u6709\u5916\u7f51\u8bbf\u95ee\u6743\u9650\u7684\u8bbe\u5907\u4e0a\u4e0b\u8f7dPython\u5b89\u88c5\u5305\uff0c\u5e76\u901a\u8fc7USB\u95ea\u5b58\u76d8\u6216\u5916\u90e8\u786c\u76d8\u5c06\u5176\u4f20\u8f93\u5230\u5185\u7f51\u8ba1\u7b97\u673a\u4e0a\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u5185\u7f51\u8d44\u6e90\u5e93<\/strong>\uff1a\u4e00\u4e9b\u516c\u53f8\u548c\u673a\u6784\u4f1a\u5728\u5185\u7f51\u4e0a\u7ef4\u62a4\u8f6f\u4ef6\u8d44\u6e90\u5e93\uff0c\u53ef\u4ee5\u5728\u8d44\u6e90\u5e93\u4e2d\u83b7\u53d6Python\u5b89\u88c5\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8bb0\u5f97\u5c06Python\u7684\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8fd0\u884cPython\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><h4>1.2 \u9009\u62e9\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h4>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684IDE\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u63d0\u524d\u4e0b\u8f7dIDE\u7684\u5b89\u88c5\u5305\uff0c\u5e38\u7528\u7684Python IDE\u5305\u62ec\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>PyCharm<\/strong>\uff1a\u529f\u80fd\u5f3a\u5927\uff0c\u652f\u6301\u591a\u79cdPython\u6846\u67b6\u548c\u5de5\u5177\u96c6\u6210\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Visual Studio Code<\/strong>\uff1a\u8f7b\u91cf\u7ea7\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u63d2\u4ef6\uff0c\u9002\u5408\u65e5\u5e38\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u5728\u5185\u7f51\u4e2d\u5b89\u88c5IDE\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u540c\u6837\u7684\u65b9\u5f0f\u83b7\u53d6\u5b89\u88c5\u5305\uff0c\u5e76\u5728\u5185\u7f51\u4e2d\u8fdb\u884c\u5206\u53d1\u548c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u672c\u5730\u5305\u7ba1\u7406\u5668<\/h3>\n<\/p>\n<p><p>\u5728\u5185\u7f51\u4e2d\u4f7f\u7528Python\uff0c\u901a\u5e38\u9700\u8981\u7ba1\u7406\u548c\u5b89\u88c5\u5404\u79cd\u7b2c\u4e09\u65b9\u5e93\u548c\u6a21\u5757\u3002\u7531\u4e8e\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95eePython\u5b98\u65b9\u7684\u5305\u7ba1\u7406\u5668PyPI\uff0c\u9700\u8981\u91c7\u53d6\u5176\u4ed6\u7b56\u7565\u3002<\/p>\n<\/p>\n<p><h4>2.1 \u4f7f\u7528\u79bb\u7ebf\u5b89\u88c5\u5305<\/h4>\n<\/p>\n<p><p>\u53ef\u4ee5\u5728\u5916\u7f51\u73af\u5883\u4e2d\u4e0b\u8f7d\u6240\u9700\u7684Python\u5e93\u7684\u79bb\u7ebf\u5b89\u88c5\u5305\uff0c\u7136\u540e\u901a\u8fc7USB\u8bbe\u5907\u7b49\u65b9\u5f0f\u5c06\u5176\u5e26\u5165\u5185\u7f51\u3002\u901a\u8fc7pip\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u79bb\u7ebf\u5305\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install package_name.whl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2.2 \u5185\u7f51\u955c\u50cf\u6e90<\/h4>\n<\/p>\n<p><p>\u4e00\u4e9b\u5927\u578b\u4f01\u4e1a\u4f1a\u5728\u5185\u7f51\u4e2d\u642d\u5efaPyPI\u7684\u955c\u50cf\u6e90\uff0c\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528\u3002\u914d\u7f6e\u5185\u7f51\u955c\u50cf\u6e90\u540e\uff0c\u53ef\u4ee5\u50cf\u5728\u5916\u7f51\u4e00\u6837\u4f7f\u7528pip\u5b89\u88c5\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install package_name --index-url=http:\/\/internal.pypi.server\/simple<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u901a\u8fc7\u5185\u7f51\u8d44\u6e90\u7ba1\u7406\u5de5\u5177\u5171\u4eab\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u56e2\u961f\u534f\u4f5c\u548c\u4ee3\u7801\u5171\u4eab\u662f\u5e38\u89c1\u9700\u6c42\u3002\u53ef\u4ee5\u4f7f\u7528\u5185\u7f51\u7684\u4ee3\u7801\u7ba1\u7406\u5de5\u5177\u6765\u5b9e\u73b0\u8fd9\u4e9b\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>3.1 \u4f7f\u7528\u5185\u7f51\u7248\u672c\u63a7\u5236\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5e38\u89c1\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u5982Git\u53ef\u4ee5\u5728\u5185\u7f51\u4e2d\u642d\u5efaGitLab\u3001Gitea\u7b49\u670d\u52a1\u3002\u901a\u8fc7\u8fd9\u4e9b\u5e73\u53f0\uff0c\u56e2\u961f\u6210\u5458\u53ef\u4ee5\u5171\u4eab\u4ee3\u7801\u4ed3\u5e93\uff0c\u8fdb\u884c\u7248\u672c\u7ba1\u7406\u548c\u534f\u4f5c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h4>3.2 \u5185\u7f51\u6587\u4ef6\u5171\u4eab\u670d\u52a1<\/h4>\n<\/p>\n<p><p>\u901a\u8fc7\u516c\u53f8\u5185\u90e8\u6587\u4ef6\u5171\u4eab\u670d\u52a1\uff0c\u5982FTP\u670d\u52a1\u5668\u3001\u4f01\u4e1a\u7f51\u76d8\u7b49\uff0c\u53ef\u4ee5\u5171\u4eab\u4ee3\u7801\u6587\u4ef6\u548c\u8d44\u6e90\u3002\u8fd9\u4e9b\u670d\u52a1\u901a\u5e38\u7531IT\u90e8\u95e8\u7ef4\u62a4\uff0c\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u548c\u53ef\u8bbf\u95ee\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5229\u7528\u7f51\u7edc\u4ee3\u7406\u8bbf\u95ee\u5916\u90e8\u8d44\u6e90<\/h3>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u5185\u7f51\u73af\u5883\u53ef\u80fd\u63d0\u4f9b\u53d7\u63a7\u7684\u5916\u7f51\u8bbf\u95ee\u9014\u5f84\uff0c\u4f8b\u5982\u901a\u8fc7\u4ee3\u7406\u670d\u52a1\u5668\u8bbf\u95ee\u4e92\u8054\u7f51\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><h4>4.1 \u914d\u7f6e\u7f51\u7edc\u4ee3\u7406<\/h4>\n<\/p>\n<p><p>\u5728Python\u4e2d\u914d\u7f6e\u7f51\u7edc\u4ee3\u7406\uff0c\u53ef\u4ee5\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u6216\u7a0b\u5e8f\u5185\u8bbe\u7f6e\u3002\u4f8b\u5982\uff0c\u901a\u8fc7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">set http_proxy=http:\/\/proxy.server.address:port<\/p>\n<p>set https_proxy=https:\/\/proxy.server.address:port<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4.2 \u4f7f\u7528Python\u4ee3\u7801\u8bbe\u7f6e\u4ee3\u7406<\/h4>\n<\/p>\n<p><p>\u5728Python\u4ee3\u7801\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7requests\u5e93\u8bbe\u7f6e\u4ee3\u7406\u8bbf\u95ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>proxies = {<\/p>\n<p>    &#39;http&#39;: &#39;http:\/\/proxy.server.address:port&#39;,<\/p>\n<p>    &#39;https&#39;: &#39;https:\/\/proxy.server.address:port&#39;,<\/p>\n<p>}<\/p>\n<p>response = requests.get(&#39;http:\/\/example.com&#39;, proxies=proxies)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u5185\u7f51\u73af\u5883\u4e0b\u7684\u5b89\u5168\u548c\u5408\u89c4<\/h3>\n<\/p>\n<p><p>\u5728\u5185\u7f51\u4f7f\u7528Python\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u9075\u5faa\u5b89\u5168\u548c\u5408\u89c4\u6807\u51c6\uff0c\u786e\u4fdd\u6570\u636e\u5b89\u5168\u548c\u7f51\u7edc\u5b89\u5168\u3002<\/p>\n<\/p>\n<p><h4>5.1 \u6570\u636e\u548c\u4ee3\u7801\u7684\u5b89\u5168\u7ba1\u7406<\/h4>\n<\/p>\n<ul>\n<li>\n<p><strong>\u654f\u611f\u6570\u636e\u4fdd\u62a4<\/strong>\uff1a\u5728\u5185\u7f51\u4e2d\u5904\u7406\u654f\u611f\u6570\u636e\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u6570\u636e\u5b58\u50a8\u548c\u4f20\u8f93\u7684\u5b89\u5168\u6027\uff0c\u4f7f\u7528\u52a0\u5bc6\u548c\u8bbf\u95ee\u63a7\u5236\u7b49\u624b\u6bb5\u4fdd\u62a4\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u5b89\u5168\u5ba1\u67e5<\/strong>\uff1a\u5b9a\u671f\u5bf9\u4ee3\u7801\u8fdb\u884c\u5b89\u5168\u5ba1\u67e5\uff0c\u8bc6\u522b\u548c\u4fee\u590d\u6f5c\u5728\u7684\u5b89\u5168\u6f0f\u6d1e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>5.2 \u9075\u5faa\u5185\u7f51\u653f\u7b56\u548c\u6cd5\u89c4<\/h4>\n<\/p>\n<ul>\n<li>\n<p><strong>\u9075\u5faa\u4f01\u4e1a\u5185\u7f51\u4f7f\u7528\u653f\u7b56<\/strong>\uff1a\u4e86\u89e3\u5e76\u9075\u5faa\u4f01\u4e1a\u7684\u5185\u7f51\u4f7f\u7528\u653f\u7b56\uff0c\u786e\u4fdd\u5f00\u53d1\u6d3b\u52a8\u5408\u89c4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6cd5\u5f8b\u6cd5\u89c4\u7684\u9075\u5faa<\/strong>\uff1a\u786e\u4fddPython\u5e94\u7528\u7a0b\u5e8f\u7684\u5f00\u53d1\u548c\u4f7f\u7528\u7b26\u5408\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\uff0c\u5c24\u5176\u662f\u5728\u6d89\u53ca\u6570\u636e\u9690\u79c1\u548c\u5b89\u5168\u7684\u9886\u57df\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5728\u5185\u7f51\u73af\u5883\u4e2d\u6709\u6548\u5730\u4f7f\u7528Python\u8fdb\u884c\u5f00\u53d1\u548c\u5e94\u7528\u3002\u6bcf\u4e2a\u6b65\u9aa4\u90fd\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u5185\u7f51\u73af\u5883\u548c\u9700\u6c42\u8fdb\u884c\u8c03\u6574\uff0c\u4ee5\u786e\u4fddPython\u5e94\u7528\u7684\u987a\u5229\u8fdb\u884c\u548c\u6210\u679c\u7684\u6700\u5927\u5316\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728\u5185\u7f51\u4f7f\u7528Python\u9700\u8981\u54ea\u4e9b\u73af\u5883\u914d\u7f6e\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728\u5185\u7f51\u4f7f\u7528Python\uff0c\u60a8\u9996\u5148\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u80fd\u8fd8\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u3002\u540c\u65f6\uff0c\u786e\u4fdd\u6709\u9002\u7528\u4e8e\u5185\u7f51\u73af\u5883\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff08\u5982pip\uff09\uff0c\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b89\u88c5\u6240\u9700\u7684\u7b2c\u4e09\u65b9\u5e93\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u5185\u7f51\u73af\u5883\u4e2d\u5b89\u88c5Python\u5e93\uff1f<\/strong><br \/>\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u7531\u4e8e\u65e0\u6cd5\u76f4\u63a5\u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u5f0f\u5b89\u88c5Python\u5e93\u3002\u9996\u5148\uff0c\u53ef\u4ee5\u63d0\u524d\u5728\u6709\u7f51\u7edc\u7684\u73af\u5883\u4e2d\u4e0b\u8f7d\u6240\u9700\u7684\u5e93\uff0c\u5c06\u5176\u6253\u5305\u4e3awheel\u6587\u4ef6\u6216zip\u6587\u4ef6\uff0c\u7136\u540e\u4f20\u8f93\u5230\u5185\u7f51\u73af\u5883\u4e2d\u8fdb\u884c\u5b89\u88c5\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u672c\u5730\u5b89\u88c5\uff1a<code>pip install package_name.whl<\/code>\u3002\u53e6\u5916\uff0c\u60a8\u4e5f\u53ef\u4ee5\u5728\u5185\u7f51\u642d\u5efa\u81ea\u5df1\u7684PyPI\u955c\u50cf\uff0c\u65b9\u4fbf\u56e2\u961f\u6210\u5458\u4f7f\u7528\u3002<\/p>\n<p><strong>\u5728\u5185\u7f51\u4e2d\u5982\u4f55\u8c03\u8bd5Python\u4ee3\u7801\uff1f<\/strong><br \/>\u8c03\u8bd5Python\u4ee3\u7801\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u3002\u5728\u5185\u7f51\u73af\u5883\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u5982PyCharm\u3001VSCode\u7b49\uff0c\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u6bd4\u5982\u65ad\u70b9\u3001\u53d8\u91cf\u76d1\u63a7\u7b49\u529f\u80fd\u3002\u5982\u679c\u60a8\u503e\u5411\u4e8e\u547d\u4ee4\u884c\u64cd\u4f5c\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528pdb\u6a21\u5757\u8fdb\u884c\u8c03\u8bd5\uff0c\u76f4\u63a5\u5728\u4ee3\u7801\u4e2d\u63d2\u5165<code>import pdb; pdb.set_trace()<\/code>\u6765\u8bbe\u7f6e\u65ad\u70b9\u3002\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u80fd\u591f\u5e2e\u52a9\u60a8\u6709\u6548\u5730\u8bc6\u522b\u548c\u89e3\u51b3\u4ee3\u7801\u4e2d\u7684\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728\u5185\u7f51\u4f7f\u7528Python\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u5185\u7f51\u73af\u5883\u7684\u9700\u6c42\u548c\u9650\u5236\u3002\u5185\u7f51\u73af\u5883\u4e2d\u4f7f\u7528Python\u7684\u5173\u952e [&hellip;]","protected":false},"author":3,"featured_media":986395,"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\/986386"}],"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=986386"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/986386\/revisions"}],"predecessor-version":[{"id":986398,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/986386\/revisions\/986398"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/986395"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=986386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=986386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=986386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}