{"id":1097765,"date":"2025-01-08T15:14:55","date_gmt":"2025-01-08T07:14:55","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1097765.html"},"modified":"2025-01-08T15:14:57","modified_gmt":"2025-01-08T07:14:57","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e6%89%bepython%e5%ae%89%e8%a3%85%e7%9a%84%e6%96%87%e4%bb%b6%e5%a4%b9-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1097765.html","title":{"rendered":"\u5982\u4f55\u67e5\u627epython\u5b89\u88c5\u7684\u6587\u4ef6\u5939"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24212405\/1a18c45d-c4db-41a5-b4df-08764212ddcb.webp\" alt=\"\u5982\u4f55\u67e5\u627epython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939<\/strong><\/p>\n<\/p>\n<p><p>\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u3001\u67e5\u770b\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u7b49\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\uff1a<strong>\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u3001\u67e5\u770b\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u3001\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u641c\u7d22\u529f\u80fd<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u662f\u4e00\u79cd\u975e\u5e38\u76f4\u89c2\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4 <code>sys<\/code> \u6a21\u5757\uff0c\u53ef\u4ee5\u8f7b\u677e\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\u3002\u4f60\u53ea\u9700\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u6216\u8005\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\u6765\u67e5\u770bPython\u7684\u5b89\u88c5\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>print(sys.executable)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u8f93\u51faPython\u89e3\u91ca\u5668\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528\u4e0d\u540c\u7684\u547d\u4ee4\u6765\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>1. Windows\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Command Prompt\uff09\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">where python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>2. macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u7ec8\u7aef\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">which python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u67e5\u770b\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u67e5\u770b\u73af\u5883\u53d8\u91cf\u4e5f\u662f\u4e00\u79cd\u67e5\u627ePython\u5b89\u88c5\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\u3002\u73af\u5883\u53d8\u91cf\u901a\u5e38\u5305\u542b\u4e86Python\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u73af\u5883\u53d8\u91cf\u6765\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>1. Windows\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u67e5\u770b\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u8ba1\u7b97\u673a\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u6216\u201c\u7528\u6237\u53d8\u91cf\u201d\u4e2d\u67e5\u627e\u540d\u4e3a <code>Path<\/code> \u7684\u53d8\u91cf\uff0c\u5176\u4e2d\u53ef\u80fd\u5305\u542bPython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/li>\n<\/ol>\n<p><h4>2. macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">echo $PATH<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u8f93\u51fa\u73af\u5883\u53d8\u91cf\u4e2d\u7684\u8def\u5f84\u5217\u8868\uff0c\u5176\u4e2d\u53ef\u80fd\u5305\u542bPython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u67e5\u627e\u5b89\u88c5\u6587\u4ef6\u5939\u662f\u4e00\u79cd\u975e\u5e38\u76f4\u89c2\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 <code>sys<\/code> \u6a21\u5757\u4e2d\u7684 <code>executable<\/code> \u5c5e\u6027\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>print(sys.executable)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u4ee3\u7801\u4f1a\u8f93\u51faPython\u89e3\u91ca\u5668\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>2. \u89e3\u91ca\u4ee3\u7801<\/h4>\n<\/p>\n<p><p><code>sys<\/code> \u6a21\u5757\u662fPython\u6807\u51c6\u5e93\u7684\u4e00\u90e8\u5206\uff0c\u63d0\u4f9b\u4e86\u4e00\u4e9b\u4e0ePython\u89e3\u91ca\u5668\u76f8\u5173\u7684\u51fd\u6570\u548c\u53d8\u91cf\u3002<code>sys.executable<\/code> \u5c5e\u6027\u8fd4\u56dePython\u89e3\u91ca\u5668\u7684\u8def\u5f84\uff0c\u8fd9\u4e2a\u8def\u5f84\u5c31\u662fPython\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u641c\u7d22\u529f\u80fd<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u641c\u7d22\u529f\u80fd\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\u4e5f\u662f\u4e00\u79cd\u6709\u6548\u7684\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u64cd\u4f5c\u7cfb\u7edf\u7684\u641c\u7d22\u529f\u80fd\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>1. Windows\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u6587\u4ef6<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5668\u7684\u641c\u7d22\u529f\u80fd\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002\u4f60\u53ef\u4ee5\u5728\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u8f93\u5165 <code>python.exe<\/code> \u8fdb\u884c\u641c\u7d22\uff0c\u8fd9\u4e2a\u641c\u7d22\u7ed3\u679c\u4f1a\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>2. macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\u7684\u641c\u7d22\u529f\u80fd\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u641c\u7d22\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">find \/ -name python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5728\u6574\u4e2a\u6587\u4ef6\u7cfb\u7edf\u4e2d\u641c\u7d22\u540d\u4e3a <code>python<\/code> \u7684\u6587\u4ef6\uff0c\u5e76\u8f93\u51fa\u5b83\u4eec\u7684\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528Python\u5305\u7ba1\u7406\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u5305\u7ba1\u7406\u5de5\u5177\uff08\u5982pip\uff09\u4e5f\u53ef\u4ee5\u67e5\u627ePython\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u6765\u67e5\u770bPython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u4ee3\u7801<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip show pip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u8f93\u51fapip\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u5b89\u88c5\u8def\u5f84\u3002\u4f60\u53ef\u4ee5\u5728 <code>Location<\/code> \u5b57\u6bb5\u4e2d\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>2. \u89e3\u91ca\u4ee3\u7801<\/h4>\n<\/p>\n<p><p><code>pip show<\/code> \u547d\u4ee4\u663e\u793a\u6307\u5b9a\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5305\u62ec\u5305\u7684\u7248\u672c\u3001\u5b89\u88c5\u8def\u5f84\u7b49\u3002\u901a\u8fc7\u67e5\u770bpip\u5305\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u4f60\u53ef\u4ee5\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u67e5\u627ePython\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u4e5f\u662f\u4e00\u79cd\u65b9\u6cd5\u3002\u8bb8\u591aIDE\u90fd\u4f1a\u663e\u793aPython\u89e3\u91ca\u5668\u7684\u8def\u5f84\uff0c\u4ece\u800c\u5e2e\u52a9\u4f60\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>1. \u793a\u4f8b\u6b65\u9aa4<\/h4>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4f7f\u7528PyCharm\u67e5\u627ePython\u5b89\u88c5\u8def\u5f84\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00PyCharm\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSettings\u201d\u3002<\/li>\n<li>\u5728\u201cSettings\u201d\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u201cProject: [your_project_name] &gt; Python Interpreter\u201d\u3002<\/li>\n<li>\u5728\u53f3\u4fa7\u7684Python\u89e3\u91ca\u5668\u5217\u8868\u4e2d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230Python\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002<\/li>\n<\/ol>\n<p><h4>2. \u89e3\u91ca\u6b65\u9aa4<\/h4>\n<\/p>\n<p><p>\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u901a\u5e38\u4f1a\u663e\u793a\u5f53\u524d\u9879\u76ee\u4f7f\u7528\u7684Python\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002\u901a\u8fc7\u67e5\u770b\u8fd9\u4e2a\u8def\u5f84\uff0c\u4f60\u53ef\u4ee5\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u3001\u67e5\u770b\u73af\u5883\u53d8\u91cf\u3001\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u3001\u901a\u8fc7\u64cd\u4f5c\u7cfb\u7edf\u7684\u641c\u7d22\u529f\u80fd\u3001\u4f7f\u7528Python\u5305\u7ba1\u7406\u5de5\u5177\u548c\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u7b49\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u52a3\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Python\u5185\u90e8\u547d\u4ee4\u662f\u4e00\u79cd\u975e\u5e38\u76f4\u89c2\u4e14\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u63a8\u8350\u4f7f\u7528\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u4f60\u8f7b\u677e\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u8ba4\u6211\u7684Python\u7248\u672c\u548c\u5b89\u88c5\u8def\u5f84\uff1f<\/strong><br \/>\u8981\u786e\u8ba4\u4f60\u7684Python\u7248\u672c\u548c\u5b89\u88c5\u8def\u5f84\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u8fd9\u5c06\u663e\u793a\u4f60\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u63a5\u7740\uff0c\u8f93\u5165<code>which python<\/code>\uff08\u5728Linux\u6216macOS\u4e0a\uff09\u6216<code>where python<\/code>\uff08\u5728Windows\u4e0a\uff09\u5c06\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b89\u88c5\u8def\u5f84\u3002\u8fd9\u4e9b\u547d\u4ee4\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u627e\u5230Python\u7684\u5b89\u88c5\u6587\u4ef6\u5939\u3002<\/p>\n<p><strong>\u5982\u679c\u6211\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86\u591a\u4e2aPython\u7248\u672c\uff0c\u5982\u4f55\u9009\u62e9\u7279\u5b9a\u7248\u672c\u7684\u8def\u5f84\uff1f<\/strong><br \/>\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5\u591a\u4e2aPython\u7248\u672c\u65f6\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7248\u672c\u7ba1\u7406\u5de5\u5177\uff0c\u6bd4\u5982<code>pyenv<\/code>\u6216<code>conda<\/code>\uff0c\u6765\u7ba1\u7406\u4e0d\u540c\u7684Python\u73af\u5883\u3002\u901a\u8fc7\u8fd9\u4e9b\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5207\u6362\u548c\u67e5\u627e\u7279\u5b9a\u7248\u672c\u7684\u5b89\u88c5\u8def\u5f84\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u547d\u4ee4<code>python3.x<\/code>\uff08\u4f8b\u5982<code>python3.8<\/code>\uff09\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u7279\u5b9a\u7248\u672c\uff0c\u786e\u4fdd\u4f60\u4f7f\u7528\u7684\u662f\u6b63\u786e\u7684Python\u5b89\u88c5\u3002<\/p>\n<p><strong>\u5728Windows\u4e2d\u5982\u4f55\u901a\u8fc7\u56fe\u5f62\u754c\u9762\u67e5\u627ePython\u5b89\u88c5\u6587\u4ef6\u5939\uff1f<\/strong><br \/>\u5728Windows\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u67e5\u627ePython\u5b89\u88c5\u6587\u4ef6\u5939\u3002\u901a\u5e38\uff0cPython\u4f1a\u5b89\u88c5\u5728<code>C:\\Users\\\u4f60\u7684\u7528\u6237\u540d\\AppData\\Local\\Programs\\Python<\/code>\u76ee\u5f55\u4e0b\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u5730\u5740\u680f\u8f93\u5165\u8fd9\u4e2a\u8def\u5f84\uff0c\u6216\u8005\u5728\u201c\u63a7\u5236\u9762\u677f\u201d\u4e2d\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u7a0b\u5e8f\uff0c\u627e\u5230Python\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u5e76\u8bbf\u95ee\u5176\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939 \u67e5\u627ePython\u5b89\u88c5\u7684\u6587\u4ef6\u5939\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u6765\u5b9e\u73b0\uff0c\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u3001\u67e5\u770b [&hellip;]","protected":false},"author":3,"featured_media":1097768,"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\/1097765"}],"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=1097765"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1097765\/revisions"}],"predecessor-version":[{"id":1097770,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1097765\/revisions\/1097770"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1097768"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1097765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1097765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1097765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}