{"id":176664,"date":"2024-05-08T19:15:15","date_gmt":"2024-05-08T11:15:15","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/176664.html"},"modified":"2024-05-08T19:15:21","modified_gmt":"2024-05-08T11:15:21","slug":"%e5%85%ac%e5%8f%b8%e7%94%b5%e8%84%91%e4%b8%8d%e8%83%bd%e8%a3%85%e8%bd%af%e4%bb%b6%ef%bc%8c%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8cpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/176664.html","title":{"rendered":"\u516c\u53f8\u7535\u8111\u4e0d\u80fd\u88c5\u8f6f\u4ef6\uff0c\u600e\u4e48\u8fd0\u884cpython"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27060435\/02c0a987-4bc8-46bb-a3f4-ec0756591183.webp\" alt=\"\u516c\u53f8\u7535\u8111\u4e0d\u80fd\u88c5\u8f6f\u4ef6\uff0c\u600e\u4e48\u8fd0\u884cpython\" \/><\/p>\n<p><p>\u5728\u9762\u5bf9\u516c\u53f8\u7535\u8111\u65e0\u6cd5\u5b89\u88c5\u8f6f\u4ef6\u7684\u9650\u5236\u4e0b\uff0c\u60a8\u4f9d\u7136\u53ef\u4ee5\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4e3b\u8981\u7684\u7b56\u7565\u5305\u62ec<strong>\u4f7f\u7528\u5728\u7ebfIDE\u3001\u642d\u5efa\u4e91\u7aef\u5f00\u53d1\u73af\u5883\u3001\u5229\u7528\u53ef\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907\u3001\u4ee5\u53ca\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6<\/strong>\u3002\u8fd9\u4e9b\u5efa\u8bae\u5e2e\u52a9\u60a8\u5728\u4e0d\u76f4\u63a5\u5b89\u88c5\u8f6f\u4ef6\u7684\u60c5\u51b5\u4e0b\u5b9e\u8df5Python\u7f16\u7a0b\u3002<strong>\u5c24\u5176\u662f\u5229\u7528\u5728\u7ebfIDE<\/strong>\uff0c\u5b83\u4e3a\u7a0b\u5e8f\u5f00\u53d1\u63d0\u4f9b\u4e86\u4e00\u79cd\u7075\u6d3b\u6027\u548c\u4fbf\u6377\u6027\uff0c\u7279\u522b\u9002\u5408\u5728\u8f6f\u4ef6\u5b89\u88c5\u53d7\u9650\u7684\u73af\u5883\u4e2d\u4f7f\u7528\u3002\u5728\u7ebfIDE\uff08Integrated Development Environment\uff0c\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u5141\u8bb8\u7528\u6237\u5728\u6d4f\u89c8\u5668\u4e2d\u7f16\u5199\u3001\u8fd0\u884c\u548c\u8c03\u8bd5\u4ee3\u7801\uff0c\u65e0\u9700\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u4efb\u4f55\u8f6f\u4ef6\u3002\u7528\u6237\u53ea\u9700\u901a\u8fc7\u7f51\u7edc\u8fde\u63a5\u5373\u53ef\u8bbf\u95ee\u8fd9\u4e9b\u5728\u7ebf\u670d\u52a1\uff0c\u5e76\u5f00\u59cb\u5176\u7f16\u7a0b\u5de5\u4f5c\u3002\u8fd9\u4e9b\u5e73\u53f0\u901a\u5e38\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u7f16\u7a0b\u8d44\u6e90\u3001\u5e93\u4ee5\u53ca\u6559\u7a0b\uff0c\u4fbf\u4e8e\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u5728\u7ebfIDE<\/h3>\n<\/p>\n<p><p>\u5728\u7ebf\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4e0d\u9519\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5b83\u4eec\u5141\u8bb8\u60a8\u5728\u7f51\u7edc\u6d4f\u89c8\u5668\u4e2d\u76f4\u63a5\u7f16\u5199\u3001\u8fd0\u884c\u548c\u8c03\u8bd5\u4ee3\u7801\uff0c\u800c\u65e0\u9700\u5b89\u88c5\u4efb\u4f55\u4e1c\u897f\u5230\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u3002\u4f8b\u5982\uff0cGoogle\u63d0\u4f9b\u7684Colab\u3001\u5fae\u8f6f\u7684Visual Studio Codespaces\u3001\u4ee5\u53caRepl.it\u90fd\u662f\u6d41\u884c\u7684\u9009\u62e9\u3002\u8fd9\u4e9b\u670d\u52a1\u5927\u591a\u63d0\u4f9b\u514d\u8d39\u7248\u672c\uff0c\u8db3\u4ee5\u6ee1\u8db3\u65e5\u5e38\u7f16\u7a0b\u9700\u8981\u3002\u5b83\u4eec\u8fd8\u5177\u6709\u989d\u5916\u597d\u5904\uff0c\u5982\u81ea\u52a8\u4fdd\u5b58\u60a8\u7684\u5de5\u4f5c\u5230\u4e91\u7aef\uff0c\u4ee5\u53ca\u6613\u4e8e\u4e0e\u4ed6\u4eba\u5171\u4eab\u548c\u534f\u4f5c\u3002<\/p>\n<\/p>\n<p><p>\u5728\u7ebfIDE\u4e0d\u4ec5\u9002\u5408\u7f16\u5199\u7b80\u5355\u7684\u4ee3\u7801\u7247\u6bb5\uff0c\u4e5f\u9002\u5408\u8fdb\u884c\u590d\u6742\u7684\u9879\u76ee\u5f00\u53d1\u3002\u5f88\u591a\u5728\u7ebfIDE\u8fd8\u63d0\u4f9b\u4e86\u4ee3\u7801\u81ea\u52a8\u8865\u5168\u3001\u8bed\u6cd5\u9ad8\u4eae\u4ee5\u53ca\u9519\u8bef\u68c0\u67e5\u7b49\u9ad8\u7ea7\u529f\u80fd\uff0c\u8fd9\u4e9b\u90fd\u5c06\u6781\u5927\u5730\u63d0\u5347\u7f16\u7801\u6548\u7387\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u642d\u5efa\u4e91\u7aef\u5f00\u53d1\u73af\u5883<\/h3>\n<\/p>\n<p><p>\u53e6\u4e00\u4e2a\u9009\u62e9\u662f\u5728\u4e91\u7aef\u642d\u5efa\u4e00\u4e2a\u5b8c\u6574\u7684Python\u5f00\u53d1\u73af\u5883\u3002\u901a\u8fc7\u4f7f\u7528AWS Cloud9\u3001Google Cloud Shell\u7b49\u4e91\u670d\u52a1\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u521b\u5efa\u3001\u914d\u7f6e\u5e76\u8bbf\u95ee\u4e00\u4e2a\u865a\u62df\u673a\uff0c\u8fd9\u4e2a\u865a\u62df\u673a\u53ef\u4ee5\u5728\u7f51\u9875\u6d4f\u89c8\u5668\u91cc\u901a\u8fc7SSH\u8fde\u63a5\u4f7f\u7528\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u597d\u5904\u662f\uff0c\u60a8\u53ef\u4ee5\u6309\u9700\u914d\u7f6e\u786c\u4ef6\u8d44\u6e90\uff0c\u5982CPU\u3001\u5185\u5b58\u548c\u5b58\u50a8\u7a7a\u95f4\uff0c\u5e76\u53ef\u6839\u636e\u9879\u76ee\u9700\u6c42\u5b89\u88c5\u6240\u9700\u7684\u5f00\u53d1\u5de5\u5177\u548c\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u4e91\u7aef\u5f00\u53d1\u73af\u5883\u63d0\u4f9b\u4e86\u4e00\u79cd\u7075\u6d3b\u7684\u5de5\u4f5c\u65b9\u5f0f\uff0c\u80fd\u591f\u8ba9\u56e2\u961f\u6210\u5458\u65e0\u8bba\u8eab\u5728\u4f55\u5904\uff0c\u53ea\u8981\u6709\u7f51\u7edc\u8fde\u63a5\uff0c\u5c31\u80fd\u8bbf\u95ee\u5230\u76f8\u540c\u7684\u5f00\u53d1\u73af\u5883\uff0c\u4ece\u800c\u4fc3\u8fdb\u4e86\u56e2\u961f\u534f\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5229\u7528\u53ef\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u5728\u7ebf\u5f00\u53d1\u5de5\u5177\u4e0d\u662f\u60a8\u7684\u9996\u9009\uff0c\u60a8\u4e5f\u53ef\u4ee5\u8003\u8651\u5c06Python\u89e3\u91ca\u5668\u4ee5\u53ca\u60a8\u7684\u4ee3\u7801\u653e\u7f6e\u5728\u53ef\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907\u4e0a\uff0c\u6bd4\u5982USB\u95ea\u5b58\u9a71\u52a8\u5668\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u60a8\u53ef\u4ee5\u5728\u4efb\u4f55\u5141\u8bb8\u4eceUSB\u9a71\u52a8\u5668\u8fd0\u884c\u8f6f\u4ef6\u7684\u7535\u8111\u4e0a\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u5728\u4e8e\u5b83\u63d0\u4f9b\u4e86\u6781\u9ad8\u7684\u7075\u6d3b\u6027\uff0c\u5e76\u4e14\u53ef\u4ee5\u4f7f\u60a8\u7684\u5de5\u4f5c\u73af\u5883\u9ad8\u5ea6\u79fb\u52a8\u5316\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u53ef\u79fb\u52a8\u5b58\u50a8\u8bbe\u5907\u65f6\uff0c\u8981\u6ce8\u610f\u9009\u62e9\u4e00\u4e2a\u8db3\u591f\u5927\u7684\u5b58\u50a8\u5bb9\u91cf\u6765\u88c5\u8f7d\u6240\u9700\u7684\u5f00\u53d1\u5de5\u5177\u548c\u5e93\uff0c\u540c\u65f6\u4fdd\u8bc1\u8bfb\u5199\u901f\u5ea6\u5339\u914d\u60a8\u7684\u5f00\u53d1\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u5bf9\u4e8e\u67d0\u4e9b\u9879\u76ee\uff0c\u60a8\u53ef\u4ee5\u8003\u8651\u5c06Python\u4ee3\u7801\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe\uff09\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5728\u6ca1\u6709\u5b89\u88c5Python\u89e3\u91ca\u5668\u7684\u7535\u8111\u4e0a\u8fd0\u884c\u3002\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u548cPy2exe\u90fd\u80fd\u591f\u5e2e\u52a9\u60a8\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002\u867d\u7136\u8fd9\u79cd\u65b9\u6cd5\u53ef\u80fd\u9700\u8981\u4e00\u5b9a\u7684\u914d\u7f6e\u5de5\u4f5c\uff0c\u4f46\u5b83\u4e3a\u60a8\u7684\u4ee3\u7801\u7684\u5206\u53d1\u548c\u6267\u884c\u63d0\u4f9b\u4e86\u6781\u5927\u7684\u7075\u6d3b\u6027\u3002<\/p>\n<\/p>\n<p><p>\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5c06\u9879\u76ee\u6240\u4f9d\u8d56\u7684\u6240\u6709\u5e93\u90fd\u5305\u542b\u5728\u5185\uff0c\u8fd9\u6837\u6700\u7ec8\u7684.exe\u6587\u4ef6\u5c31\u6210\u4e3a\u4e86\u4e00\u4e2a\u72ec\u7acb\u7684\u3001\u53ef\u4ee5\u5728\u6ca1\u6709\u4efb\u4f55\u4f9d\u8d56\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u7684\u7a0b\u5e8f\u3002\u8fd9\u5bf9\u4e8e\u90e8\u7f72\u5e94\u7528\u7a0b\u5e8f\u5230\u751f\u4ea7\u73af\u5883\u6216\u662f\u5411\u4e0d\u719f\u6089Python\u73af\u5883\u914d\u7f6e\u7684\u7528\u6237\u5206\u53d1\u8f6f\u4ef6\u5c24\u5176\u6709\u7528\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4efb\u4e00\u79cd\u65b9\u6cd5\uff0c\u5373\u4f7f\u662f\u5728\u4e25\u683c\u9650\u5236\u5b89\u88c5\u8f6f\u4ef6\u7684\u73af\u5883\u4e0b\uff0c\u60a8\u4e5f\u53ef\u4ee5\u7ee7\u7eed\u60a8\u7684Python\u5f00\u53d1\u5de5\u4f5c\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u81ea\u8eab\u7684\u4f18\u70b9\u548c\u9002\u7528\u573a\u666f\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u5177\u4f53\u9700\u6c42\u548c\u6761\u4ef6\u9009\u62e9\u6700\u5408\u9002\u7684\u4e00\u79cd\u6216\u591a\u79cd\u65b9\u6cd5\u7ec4\u5408\u4f7f\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>Q1: \u516c\u53f8\u7535\u8111\u65e0\u6cd5\u5b89\u88c5\u8f6f\u4ef6\uff0c\u4f46\u6211\u60f3\u8fd0\u884cPython\uff0c\u6709\u4ec0\u4e48\u89e3\u51b3\u529e\u6cd5\u5417\uff1f<\/strong><\/p>\n<p>A1: \u5982\u679c\u4f60\u7684\u516c\u53f8\u7535\u8111\u7981\u6b62\u5b89\u88c5\u8f6f\u4ef6\uff0c\u4f46\u4f60\u60f3\u8fd0\u884cPython\uff0c\u4f60\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4fbf\u643a\u5f0f\u73af\u5883\uff0c\u6bd4\u5982Anaconda\u6216Miniconda\u3002\u8fd9\u4e9b\u73af\u5883\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u53ef\u4ee5\u5728\u4e0d\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u7684\u60c5\u51b5\u4e0b\u8fd0\u884cPython\u3002\u4f60\u53ea\u9700\u5728\u4f60\u7684\u7535\u8111\u4e0a\u4e0b\u8f7d\u548c\u5b89\u88c5\u4e00\u4e2a\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u4fbf\u643a\u5f0f\u73af\u5883\u7248\u672c\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u4e86\u3002<\/p>\n<p><strong>Q2: \u4f5c\u4e3a\u516c\u53f8\u5458\u5de5\uff0c\u6211\u5982\u4f55\u5728\u4e0d\u80fd\u5b89\u88c5\u8f6f\u4ef6\u7684\u7535\u8111\u4e0a\u8fd0\u884cPython\uff1f<\/strong><\/p>\n<p>A2: \u5982\u679c\u4f60\u672a\u88ab\u5141\u8bb8\u5728\u516c\u53f8\u7535\u8111\u4e0a\u5b89\u88c5\u8f6f\u4ef6\uff0c\u4f46\u4f60\u9700\u8981\u8fd0\u884cPython\uff0c\u4f60\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u5728\u7ebf\u7684Python\u7f16\u7a0b\u73af\u5883\u3002\u6709\u4e00\u4e9b\u5728\u7ebf\u5e73\u53f0\uff08\u4f8b\u5982repl.it\u3001Cocalc\u7b49\uff09\u63d0\u4f9b\u4e86\u5b8c\u6574\u7684Python\u5f00\u53d1\u73af\u5883\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u7f51\u9875\u4e2d\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u800c\u4e0d\u9700\u8981\u5728\u4f60\u7684\u7535\u8111\u4e0a\u5b89\u88c5\u4efb\u4f55\u8f6f\u4ef6\u3002\u8fd9\u662f\u4e00\u79cd\u65b9\u4fbf\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u7279\u522b\u9002\u7528\u4e8e\u77ed\u671f\u6216\u4e34\u65f6\u7684\u9879\u76ee\u3002<\/p>\n<p><strong>Q3: \u516c\u53f8\u7535\u8111\u4e0d\u5141\u8bb8\u5b89\u88c5\u8f6f\u4ef6\uff0c\u4f46\u6211\u6025\u9700\u5728Python\u4e2d\u8fd0\u884c\u7279\u5b9a\u7684\u5e93\uff0c\u600e\u4e48\u529e\uff1f<\/strong><\/p>\n<p>A3: \u5982\u679c\u4f60\u9700\u8981\u4f7f\u7528\u7279\u5b9a\u7684Python\u5e93\uff0c\u4f46\u4e0d\u80fd\u5728\u516c\u53f8\u7535\u8111\u4e0a\u5b89\u88c5\u8f6f\u4ef6\uff0c\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u865a\u62df\u73af\u5883\u3002\u865a\u62df\u73af\u5883\u5141\u8bb8\u4f60\u5728\u6ca1\u6709\u7ba1\u7406\u5458\u6743\u9650\u7684\u60c5\u51b5\u4e0b\u521b\u5efa\u4e00\u4e2a\u9694\u79bb\u7684Python\u73af\u5883\uff0c\u5e76\u5728\u5176\u4e2d\u5b89\u88c5\u6240\u9700\u7684\u5e93\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5de5\u5177\u5982virtualenv\u6216conda\u6765\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u5e76\u5728\u5176\u4e2d\u5b89\u88c5\u4f60\u9700\u8981\u7684\u5e93\u3002\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728\u516c\u53f8\u7535\u8111\u4e0a\u8fd0\u884c\u7279\u5b9a\u7684Python\u5e93\uff0c\u800c\u4e0d\u4f1a\u5bf9\u7cfb\u7edf\u9020\u6210\u4efb\u4f55\u53d8\u5316\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728\u9762\u5bf9\u516c\u53f8\u7535\u8111\u65e0\u6cd5\u5b89\u88c5\u8f6f\u4ef6\u7684\u9650\u5236\u4e0b\uff0c\u60a8\u4f9d\u7136\u53ef\u4ee5\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4e3b\u8981\u7684\u7b56\u7565\u5305\u62ec\u4f7f\u7528\u5728\u7ebfIDE\u3001\u642d\u5efa\u4e91\u7aef\u5f00\u53d1 [&hellip;]","protected":false},"author":3,"featured_media":176670,"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\/176664"}],"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=176664"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/176664\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/176670"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=176664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=176664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=176664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}