{"id":972016,"date":"2024-12-27T05:40:10","date_gmt":"2024-12-26T21:40:10","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/972016.html"},"modified":"2024-12-27T05:40:13","modified_gmt":"2024-12-26T21:40:13","slug":"windows%e5%a6%82%e4%bd%95%e6%9f%a5%e8%af%a2python%e4%bd%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/972016.html","title":{"rendered":"windows\u5982\u4f55\u67e5\u8be2python\u4f4d\u7f6e"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24194855\/45c5381c-12ed-4be9-93c1-a32d341bfff5.webp\" alt=\"windows\u5982\u4f55\u67e5\u8be2python\u4f4d\u7f6e\" \/><\/p>\n<p><p> <strong>\u5728Windows\u4e2d\u67e5\u8be2Python\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684<code>where<\/code>\u547d\u4ee4\u3001\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u67e5\u627e\u3001\u4f7f\u7528Python\u81ea\u5e26\u547d\u4ee4<code>sys.executable<\/code>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684<code>where<\/code>\u547d\u4ee4\u662f\u6700\u4e3a\u76f4\u89c2\u548c\u4fbf\u6377\u7684\u65b9\u6cd5\u3002<\/strong>\u8be6\u7ec6\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><p>\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684<code>where<\/code>\u547d\u4ee4\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u201c\u8fd0\u884c\u201d\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165<code>cmd<\/code>\u6765\u6253\u5f00\uff09\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code>where python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002\u5982\u679c\u4f60\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u5b83\u4eec\u7684\u4f4d\u7f6e\u90fd\u4f1a\u88ab\u5217\u51fa\u3002\u8fd9\u79cd\u65b9\u6cd5\u5feb\u901f\u3001\u76f4\u63a5\uff0c\u662f\u5b9a\u4f4dPython\u5b89\u88c5\u8def\u5f84\u7684\u9996\u9009\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684<code>where<\/code>\u547d\u4ee4<\/h3>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c<code>where<\/code>\u547d\u4ee4\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u67e5\u627e\u53ef\u6267\u884c\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002\u901a\u8fc7\u8fd9\u4e2a\u547d\u4ee4\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26<\/strong><br \/>\u9996\u5148\uff0c\u4f60\u9700\u8981\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Command Prompt\uff09\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b <code>Win + R<\/code> \u6253\u5f00\u201c\u8fd0\u884c\u201d\u5bf9\u8bdd\u6846\uff0c\u7136\u540e\u8f93\u5165 <code>cmd<\/code> \u5e76\u6309\u4e0b\u56de\u8f66\u952e\u6765\u6253\u5f00\u5b83\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8f93\u5165\u547d\u4ee4<\/strong><br \/>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5e76\u6309\u4e0b\u56de\u8f66\u952e\uff1a<\/p>\n<\/p>\n<p><pre><code>where python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u663e\u793a\u6240\u6709\u5728\u7cfb\u7edf\u8def\u5f84\u4e2d\u627e\u5230\u7684Python\u53ef\u6267\u884c\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u91ca\u7ed3\u679c<\/strong><br \/>\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c<code>where<\/code>\u547d\u4ee4\u5c06\u5217\u51fa\u6bcf\u4e2a\u7248\u672c\u7684\u8def\u5f84\u3002\u901a\u5e38\uff0c\u7b2c\u4e00\u4e2a\u8def\u5f84\u662f\u5f53\u524d\u4f7f\u7528\u7684Python\u7248\u672c\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u70b9\u5728\u4e8e\u5176\u7b80\u5355\u548c\u76f4\u63a5\uff0c\u4e0d\u9700\u8981\u8fdb\u5165\u4efb\u4f55\u590d\u6742\u7684\u8bbe\u7f6e\u6216\u83dc\u5355\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u67e5\u627e<\/h3>\n<\/p>\n<p><p>\u73af\u5883\u53d8\u91cf\u662f\u64cd\u4f5c\u7cfb\u7edf\u7528\u6765\u5b58\u50a8\u5e94\u7528\u7a0b\u5e8f\u548c\u8fdb\u7a0b\u4fe1\u606f\u7684\u5730\u65b9\uff0c\u5176\u4e2d\u4e5f\u5305\u62ecPython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027<\/strong><br \/>\u53f3\u952e\u5355\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u6211\u7684\u7535\u8111\u201d\u56fe\u6807\uff0c\u7136\u540e\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002\u5728\u6253\u5f00\u7684\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e<\/strong><br \/>\u5728\u7cfb\u7edf\u5c5e\u6027\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002\u8fd9\u5c06\u6253\u5f00\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\u7a97\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u627ePython\u8def\u5f84<\/strong><br \/>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u540d\u4e3a <code>Path<\/code> \u7684\u53d8\u91cf\u5e76\u53cc\u51fb\u5b83\u3002\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u8def\u5f84\u7684\u5217\u8868\uff0c\u5176\u4e2d\u4e4b\u4e00\u5c06\u662fPython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7684\u4f18\u52bf\u5728\u4e8e\u5b83\u53ef\u4ee5\u5e2e\u52a9\u4f60\u68c0\u67e5\u548c\u4fee\u6539Python\u5728\u7cfb\u7edf\u4e2d\u7684\u5b89\u88c5\u8def\u5f84\u4ee5\u53ca\u786e\u4fddPython\u8def\u5f84\u6b63\u786e\u8bbe\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528Python\u81ea\u5e26\u547d\u4ee4<code>sys.executable<\/code><\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u5e76\u4e14\u53ef\u4ee5\u8bbf\u95eePython\u89e3\u91ca\u5668\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Python\u81ea\u5e26\u7684\u547d\u4ee4\u6765\u67e5\u627e\u5176\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00Python\u89e3\u91ca\u5668<\/strong><br \/>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165 <code>python<\/code> \u5e76\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u8fdb\u5165Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8f93\u5165\u547d\u4ee4<\/strong><br \/>\u5728Python\u89e3\u91ca\u5668\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\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\u5c06\u8f93\u51faPython\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u91ca\u7ed3\u679c<\/strong><br \/>\u8f93\u51fa\u7684\u8def\u5f84\u5373\u4e3aPython\u7684\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\uff0c\u901a\u5e38\u662f\u5728\u5b89\u88c5\u76ee\u5f55\u4e2d\u7684 <code>python.exe<\/code> \u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u7528\u4e8e\u9700\u8981\u4ecePython\u5185\u90e8\u786e\u8ba4\u5176\u8def\u5f84\u7684\u573a\u666f\uff0c\u5bf9\u4e8e\u5f00\u53d1\u8005\u6765\u8bf4\u662f\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u901a\u8fc7Windows\u641c\u7d22\u529f\u80fd<\/h3>\n<\/p>\n<p><p>Windows\u7684\u641c\u7d22\u529f\u80fd\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\u3002\u867d\u7136\u8fd9\u4e0d\u662f\u6700\u4e3a\u9ad8\u6548\u7684\u65b9\u6cd5\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u80fd\u4f1a\u6709\u7528\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528Windows\u641c\u7d22<\/strong><br \/>\u70b9\u51fb\u4efb\u52a1\u680f\u4e0a\u7684\u641c\u7d22\u56fe\u6807\uff0c\u8f93\u5165\u201cPython\u201d\uff0cWindows\u4f1a\u663e\u793a\u4e0ePython\u76f8\u5173\u7684\u5e94\u7528\u548c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u6587\u4ef6\u4f4d\u7f6e<\/strong><br \/>\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\uff0c\u53f3\u952e\u5355\u51fbPython\u5e94\u7528\u7a0b\u5e8f\uff0c\u7136\u540e\u9009\u62e9\u201c\u6253\u5f00\u6587\u4ef6\u4f4d\u7f6e\u201d\u3002\u8fd9\u5c06\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u5668\u7a97\u53e3\uff0c\u5176\u4e2d\u663e\u793aPython\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u786e\u8ba4\u8def\u5f84<\/strong><br \/>\u5728\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u7684\u5730\u5740\u680f\u4e2d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230Python\u7684\u5b8c\u6574\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u867d\u7136\u8fd9\u4e0d\u662f\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\uff0c\u4f46\u5bf9\u4e8e\u4e0d\u719f\u6089\u547d\u4ee4\u63d0\u793a\u7b26\u7684\u7528\u6237\u6765\u8bf4\uff0c\u53ef\u80fd\u66f4\u4e3a\u76f4\u89c2\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528Python\u5305\u7ba1\u7406\u5668\uff08\u5982Anaconda\uff09<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u662f\u901a\u8fc7Anaconda\u7b49Python\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u7684Python\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7Anaconda\u63d0\u4f9b\u7684\u5de5\u5177\u6765\u67e5\u627ePython\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00Anaconda\u547d\u4ee4\u63d0\u793a\u7b26<\/strong><br \/>\u5728Windows\u83dc\u5355\u4e2d\u627e\u5230\u5e76\u6253\u5f00\u201cAnaconda Prompt\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8f93\u5165\u547d\u4ee4<\/strong><br \/>\u5728Anaconda Prompt\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code>conda list<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u5217\u51fa\u6240\u6709\u5b89\u88c5\u7684\u5305\u548c\u5b83\u4eec\u7684\u8def\u5f84\uff0c\u5176\u4e2d\u4e5f\u5305\u62ecPython\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u89e3\u91ca\u7ed3\u679c<\/strong><br \/>\u5728\u5217\u8868\u4e2d\u67e5\u627ePython\u7684\u6761\u76ee\uff0c\u901a\u5e38\u4f1a\u663e\u793aPython\u7684\u7248\u672c\u53f7\u548c\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7279\u522b\u9002\u5408\u4e8e\u4f7f\u7528Anaconda\u7ba1\u7406Python\u73af\u5883\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u4f7f\u7528\u7b2c\u4e09\u65b9\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u6709\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u67e5\u627e\u5e76\u7ba1\u7406Python\u7684\u5b89\u88c5\u8def\u5f84\u3002\u8fd9\u4e9b\u5de5\u5177\u901a\u5e38\u63d0\u4f9b\u7528\u6237\u53cb\u597d\u7684\u754c\u9762\uff0c\u9002\u5408\u4e0d\u719f\u6089\u547d\u4ee4\u884c\u64cd\u4f5c\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528PyCharm\u7b49IDE<\/strong><br \/>\u4e00\u4e9bIDE\uff0c\u5982PyCharm\uff0c\u63d0\u4f9b\u4e86\u76f4\u63a5\u67e5\u770b\u548c\u7ba1\u7406Python\u8def\u5f84\u7684\u529f\u80fd\u3002\u5728PyCharm\u4e2d\uff0c\u4f60\u53ef\u4ee5\u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u83dc\u5355\uff0c\u67e5\u770bPython\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Python\u73af\u5883\u7ba1\u7406\u5de5\u5177<\/strong><br \/>\u5de5\u5177\u5982Virtualenvwrapper\u3001Pyenv\u7b49\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\uff0c\u5e76\u4e14\u63d0\u4f9b\u7b80\u4fbf\u7684\u65b9\u5f0f\u6765\u67e5\u770b\u548c\u5207\u6362Python\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5176\u4ed6\u5de5\u5177<\/strong><br \/>\u5e02\u9762\u4e0a\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u4e13\u95e8\u7528\u4e8e\u67e5\u627e\u548c\u7ba1\u7406Python\u8def\u5f84\u7684\u5c0f\u5de5\u5177\uff0c\u53ef\u4ee5\u6839\u636e\u4e2a\u4eba\u9700\u8981\u8fdb\u884c\u9009\u62e9\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0c\u5728Windows\u4e2d\u67e5\u627ePython\u7684\u4f4d\u7f6e\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\uff0c\u4ece\u7b80\u5355\u76f4\u63a5\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u5230\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\uff0c\u518d\u5230\u5229\u7528Python\u81ea\u5e26\u7684\u529f\u80fd\u548c\u7b2c\u4e09\u65b9\u5de5\u5177\uff0c\u4e0d\u540c\u7684\u65b9\u6cd5\u9002\u5408\u4e0d\u540c\u7684\u4f7f\u7528\u573a\u666f\u548c\u7528\u6237\u9700\u6c42\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\uff1f<\/strong><br \/>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u7b80\u5355\u7684\u65b9\u6cd5\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u60a8\u53ef\u4ee5\u6309\u4e0b\u201cWindows + R\u201d\u952e\uff0c\u8f93\u5165\u201ccmd\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u7a97\u53e3\u4e2d\u8f93\u5165<code>where python<\/code>\uff0c\u8fd9\u5c06\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fAnaconda\u6216\u5176\u4ed6Python\u53d1\u884c\u7248\uff0c\u4e5f\u53ef\u4ee5\u5c1d\u8bd5\u8f93\u5165<code>where python3<\/code>\u6216<code>where python.exe<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u8ba4Python\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u5728Windows\u4e0a\uff1f<\/strong><br \/>\u786e\u8ba4Python\u662f\u5426\u5df2\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u8fdb\u884c\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u5e76\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u5982\u679cPython\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u60a8\u5c06\u770b\u5230\u76f8\u5e94\u7684\u7248\u672c\u53f7\u3002\u5982\u679c\u51fa\u73b0\u9519\u8bef\u63d0\u793a\uff0c\u8bf4\u660e\u53ef\u80fd\u672a\u5b89\u88c5Python\u6216\u672a\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Windows\u4e2d\u8bbe\u7f6ePython\u7684\u73af\u5883\u53d8\u91cf\uff1f<\/strong><br \/>\u5982\u679c\u60a8\u5e0c\u671b\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u90fd\u80fd\u4f7f\u7528Python\u547d\u4ee4\uff0c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u8ba1\u7b97\u673a\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\u627e\u5230\u201cPath\u201d\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\uff0c\u6dfb\u52a0Python\u7684\u5b89\u88c5\u8def\u5f84\uff08\u4f8b\u5982<code>C:\\Python39\\<\/code>\uff09\u548cScripts\u6587\u4ef6\u5939\u8def\u5f84\uff08\u4f8b\u5982<code>C:\\Python39\\Scripts\\<\/code>\uff09\u3002\u4fdd\u5b58\u8bbe\u7f6e\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u4f7f\u7528Python\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Windows\u4e2d\u67e5\u8be2Python\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u7684where\u547d\u4ee4\u3001\u901a\u8fc7\u73af\u5883\u53d8\u91cf [&hellip;]","protected":false},"author":3,"featured_media":972027,"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\/972016"}],"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=972016"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972016\/revisions"}],"predecessor-version":[{"id":972028,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/972016\/revisions\/972028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/972027"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=972016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=972016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=972016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}