{"id":1011084,"date":"2024-12-27T11:26:53","date_gmt":"2024-12-27T03:26:53","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1011084.html"},"modified":"2024-12-27T11:26:56","modified_gmt":"2024-12-27T03:26:56","slug":"%e5%a6%82%e4%bd%95%e7%94%a8cmd%e5%ae%89%e8%a3%85python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1011084.html","title":{"rendered":"\u5982\u4f55\u7528cmd\u5b89\u88c5python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085351\/77cf6ca8-1d12-4c75-9783-e96e0a148630.webp\" alt=\"\u5982\u4f55\u7528cmd\u5b89\u88c5python\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528CMD\u5b89\u88c5Python\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/strong>\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u662f\u6574\u4e2a\u8fc7\u7a0b\u7684\u7b2c\u4e00\u6b65\uff0c\u5b89\u88c5\u5305\u53ef\u4ee5\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\uff0c\u8fd9\u4e00\u6b65\u786e\u4fdd\u4f60\u83b7\u5f97\u7684\u662f\u6700\u65b0\u7248\u672c\u3002\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7CMD\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\uff0c\u786e\u4fdd\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0cPython\u8def\u5f84\u4f1a\u81ea\u52a8\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u65b9\u4fbf\u540e\u7eed\u4f7f\u7528\u3002\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u4e3a\u4e86\u786e\u4fdd\u5728CMD\u4e2d\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884cPython\u547d\u4ee4\uff0c\u8fd9\u4e00\u6b65\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u5728\u8be6\u7ec6\u63cf\u8ff0\u4e2d\uff0c\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecd<strong>\u5982\u4f55\u5728CMD\u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\u3002\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u76ee\u7684\u662f\u4e3a\u4e86\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\uff0c\u800c\u4e0d\u9700\u8981\u8f93\u5165\u5b8c\u6574\u7684Python\u5b89\u88c5\u8def\u5f84\u3002\u901a\u5e38\uff0c\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u5b8c\u6210\u8fd9\u4e00\u6b65\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7528\u6237\u9700\u8981\u624b\u52a8\u914d\u7f6e\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027-&gt;\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e-&gt;\u73af\u5883\u53d8\u91cf\uff0c\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u201cPath\u201d\uff0c\u7136\u540e\u7f16\u8f91\uff0c\u6dfb\u52a0Python\u5b89\u88c5\u76ee\u5f55\uff08\u5982C:\\Python39\uff09\u548cScripts\u76ee\u5f55\uff08\u5982C:\\Python39\\Scripts\uff09\u3002\u901a\u8fc7\u8fd9\u4e00\u6b65\uff0cCMD\u5c31\u53ef\u4ee5\u8bc6\u522bPython\u547d\u4ee4\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u76f4\u63a5\u8fd0\u884cPython\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4ece\u4e0b\u8f7d\u3001\u5b89\u88c5\u3001\u914d\u7f6e\u4ee5\u53ca\u9a8c\u8bc1\u56db\u4e2a\u65b9\u9762\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7CMD\u5b89\u88c5Python\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\u3002Python\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E6%8F%90%E4%BE%9B%E4%BA%86%E5%90%84%E7%A7%8D%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%89%E8%A3%85%E5%8C%85%EF%BC%8C%E5%8C%85%E6%8B%ACWindows%E3%80%81macOS%E5%92%8CLinux%E3%80%82%E4%BB%A5%E4%B8%8B%E6%98%AF%E5%85%B7%E4%BD%93%E6%AD%A5%E9%AA%A4%EF%BC%9A\">https:\/\/www.python.org\/\uff09\u63d0\u4f9b\u4e86\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u5305\u62ecWindows\u3001macOS\u548cLinux\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/a><\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbf\u95ee\u5b98\u65b9\u7f51\u7ad9<\/strong>\uff1a\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165Python\u5b98\u65b9\u7f51\u7ad9\u7684\u5730\u5740\uff0c\u5e76\u8fdb\u5165\u4e0b\u8f7d\u9875\u9762\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9\u5408\u9002\u7684\u7248\u672c<\/strong>\uff1aPython\u7684\u5b98\u65b9\u7f51\u7ad9\u4f1a\u6839\u636e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u81ea\u52a8\u63a8\u8350\u5408\u9002\u7684\u7248\u672c\u3002\u60a8\u53ef\u4ee5\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\uff0c\u901a\u5e38\u4f1a\u6807\u8bb0\u4e3a\u201cLatest Python 3 Release\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4e0b\u8f7d\u5b89\u88c5\u5305<\/strong>\uff1a\u70b9\u51fb\u4e0b\u8f7d\u6309\u94ae\uff0c\u5c06\u5b89\u88c5\u5305\u4e0b\u8f7d\u5230\u672c\u5730\u8ba1\u7b97\u673a\u3002\u5b89\u88c5\u5305\u901a\u5e38\u4e3a.exe\u683c\u5f0f\uff0c\u9002\u7528\u4e8eWindows\u7cfb\u7edf\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u4e0b\u8f7d\u76ee\u5f55\u4e2d\u627e\u5230\u8be5\u5b89\u88c5\u5305\uff0c\u4e3a\u63a5\u4e0b\u6765\u7684\u5b89\u88c5\u6b65\u9aa4\u505a\u51c6\u5907\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u8fd0\u884cPython\u5b89\u88c5\u7a0b\u5e8f<\/h3>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u901a\u8fc7CMD\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u6765\u5b89\u88c5Python\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00CMD<\/strong>\uff1a\u6309Win+R\u952e\uff0c\u8f93\u5165cmd\uff0c\u6309\u56de\u8f66\u952e\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5bfc\u822a\u5230\u4e0b\u8f7d\u76ee\u5f55<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165cd\u547d\u4ee4\uff0c\u5bfc\u822a\u5230\u4e0b\u8f7d\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5b89\u88c5\u5305\u4fdd\u5b58\u5728\u201cDownloads\u201d\u6587\u4ef6\u5939\u4e2d\uff0c\u8f93\u5165<code>cd Downloads<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165Python\u5b89\u88c5\u5305\u7684\u540d\u79f0\u5e76\u6309\u56de\u8f66\uff0c\u4f8b\u5982<code>python-3.9.7.exe<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9\u5b89\u88c5\u9009\u9879<\/strong>\uff1a\u5b89\u88c5\u7a0b\u5e8f\u542f\u52a8\u540e\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\u3002\u8fd9\u4e00\u6b65\u5c06\u81ea\u52a8\u5c06Python\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5f00\u59cb\u5b89\u88c5<\/strong>\uff1a\u70b9\u51fb\u201cInstall Now\u201d\u6309\u94ae\u5f00\u59cb\u5b89\u88c5\u3002\u5b89\u88c5\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\uff0c\u5177\u4f53\u65f6\u95f4\u53d6\u51b3\u4e8e\u8ba1\u7b97\u673a\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u9a8c\u8bc1Python\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u786e\u4fdd\u5728CMD\u4e2d\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884cPython\u547d\u4ee4\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027<\/strong>\uff1a\u5728\u684c\u9762\u4e0a\u53f3\u952e\u201c\u6b64\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fdb\u5165\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e<\/strong>\uff1a\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u8f91\u7cfb\u7edf\u53d8\u91cf<\/strong>\uff1a\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u5e76\u9009\u62e9\u201cPath\u201d\u53d8\u91cf\uff0c\u7136\u540e\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u6309\u94ae\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0Python\u8def\u5f84<\/strong>\uff1a\u5728\u201c\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u65b0\u5efa\u201d\u6309\u94ae\uff0c\u6dfb\u52a0Python\u5b89\u88c5\u76ee\u5f55\uff08\u5982C:\\Python39\uff09\u548cScripts\u76ee\u5f55\uff08\u5982C:\\Python39\\Scripts\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u66f4\u6539<\/strong>\uff1a\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u6309\u94ae\uff0c\u4fdd\u5b58\u66f4\u6539\u5e76\u5173\u95ed\u6240\u6709\u7a97\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u8fd9\u4e00\u6b65\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u914d\u7f6e\u4e86Python\u7684\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u9a8c\u8bc1Python\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fddPython\u5df2\u6210\u529f\u5b89\u88c5\u5e76\u914d\u7f6e\u6b63\u786e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7CMD\u9a8c\u8bc1\u5b89\u88c5\u60c5\u51b5\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00CMD<\/strong>\uff1a\u6309Win+R\u952e\uff0c\u8f93\u5165cmd\uff0c\u6309\u56de\u8f66\u952e\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1Python\u7248\u672c<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python -V<\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\u3002\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u60a8\u5c06\u770b\u5230Python\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1pip\u7248\u672c<\/strong>\uff1apip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u9ed8\u8ba4\u968fPython\u4e00\u8d77\u5b89\u88c5\u3002\u8f93\u5165<code>pip --version<\/code>\u5e76\u6309\u56de\u8f66\uff0c\u67e5\u770bpip\u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython\u89e3\u91ca\u5668<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python<\/code>\u5e76\u6309\u56de\u8f66\uff0c\u8fdb\u5165Python\u89e3\u91ca\u5668\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165Python\u4ee3\u7801\u5e76\u6d4b\u8bd5\u5176\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86Python\uff0c\u5e76\u53ef\u4ee5\u5728CMD\u4e2d\u8fd0\u884cPython\u547d\u4ee4\u3002\u5b89\u88c5\u6210\u529f\u540e\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53ef\u80fd\u7684\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u65e0\u6cd5\u8bc6\u522bPython\u547d\u4ee4<\/strong>\uff1a\u5982\u679c\u5728CMD\u4e2d\u8f93\u5165<code>python<\/code>\u540e\u663e\u793a\u201c\u4e0d\u662f\u5185\u90e8\u6216\u5916\u90e8\u547d\u4ee4\u201d\uff0c\u8bf4\u660e\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u4e0d\u6b63\u786e\u3002\u8bf7\u91cd\u65b0\u68c0\u67e5\u5e76\u786e\u4fddPython\u8def\u5f84\u5df2\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u9519\u8bef<\/strong>\uff1a\u786e\u4fdd\u60a8\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u517c\u5bb9\u3002\u5982\u679c\u5b89\u88c5\u7a0b\u5e8f\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cCMD\uff0c\u7136\u540e\u518d\u6b21\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>pip\u65e0\u6cd5\u6b63\u5e38\u4f7f\u7528<\/strong>\uff1a\u5982\u679c\u5728\u4f7f\u7528pip\u65f6\u51fa\u73b0\u9519\u8bef\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u7f51\u7edc\u95ee\u9898\u5bfc\u81f4\u65e0\u6cd5\u8fde\u63a5\u5230Python\u5305\u7ba1\u7406\u670d\u52a1\u5668\u3002\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u56fd\u5185\u7684\u955c\u50cf\u6e90\uff0c\u4f8b\u5982\u6e05\u534e\u5927\u5b66\u7684\u955c\u50cf\u6e90\uff0c\u901a\u8fc7\u4fee\u6539pip\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u89e3\u51b3\u6b64\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u6210\u529f\u901a\u8fc7CMD\u5b89\u88c5Python\uff0c\u5e76\u89e3\u51b3\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898\u3002Python\u662f\u4e00\u79cd\u5f3a\u5927\u4e14\u7075\u6d3b\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u63a2\u7d22Python\u7684\u5404\u79cd\u529f\u80fd\u548c\u5e94\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u901a\u8fc7CMD\u5b89\u88c5Python\uff1f<\/strong><br \/>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u6253\u5f00CMD\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684Python\u5b89\u88c5\u5305\u3002\u4e0b\u8f7d\u540e\uff0c\u8fdb\u5165CMD\uff0c\u4f7f\u7528\u547d\u4ee4\u884c\u5bfc\u822a\u5230\u4e0b\u8f7d\u76ee\u5f55\uff0c\u8f93\u5165\u5b89\u88c5\u547d\u4ee4\uff0c\u4f8b\u5982<code>python-3.x.x.exe<\/code>\uff0c\u786e\u4fdd\u6dfb\u52a0\u4e86<code>\/quiet InstallAllUsers=1 PrependPath=1<\/code>\u53c2\u6570\uff0c\u4ee5\u4fbf\u9759\u9ed8\u5b89\u88c5\u5e76\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002\u5b8c\u6210\u540e\uff0c\u8f93\u5165<code>python<\/code>\u547d\u4ee4\u4ee5\u786e\u8ba4\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<p><strong>CMD\u5b89\u88c5Python\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u4e8b\u9879\uff1f<\/strong><br \/>\u5728\u4f7f\u7528CMD\u5b89\u88c5Python\u524d\uff0c\u786e\u4fdd\u4f60\u7684Windows\u7cfb\u7edf\u662f\u517c\u5bb9\u7684\u7248\u672c\u3002\u4e0b\u8f7d\u7684Python\u5b89\u88c5\u5305\u4e5f\u9700\u8981\u4e0e\u7cfb\u7edf\u67b6\u6784\u5339\u914d\uff0832\u4f4d\u621664\u4f4d\uff09\u3002\u53e6\u5916\uff0c\u4e3a\u4e86\u907f\u514d\u6743\u9650\u95ee\u9898\uff0c\u5efa\u8bae\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cCMD\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u8bf7\u52a1\u5fc5\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728CMD\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<p><strong>\u5982\u4f55\u9a8c\u8bc1CMD\u4e2dPython\u7684\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728CMD\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python -V<\/code>\u547d\u4ee4\u3002\u5982\u679cPython\u6b63\u786e\u5b89\u88c5\uff0c\u4f1a\u663e\u793a\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u5982\u679c\u770b\u5230\u9519\u8bef\u4fe1\u606f\u6216\u627e\u4e0d\u5230\u547d\u4ee4\uff0c\u53ef\u80fd\u9700\u8981\u91cd\u65b0\u68c0\u67e5\u5b89\u88c5\u6b65\u9aa4\uff0c\u786e\u4fddPython\u7684\u8def\u5f84\u5df2\u6b63\u786e\u8bbe\u7f6e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528CMD\u5b89\u88c5Python\u4e3b\u8981\u6709\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u4e0b\u8f7dPyth [&hellip;]","protected":false},"author":3,"featured_media":1011094,"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\/1011084"}],"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=1011084"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011084\/revisions"}],"predecessor-version":[{"id":1011097,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011084\/revisions\/1011097"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1011094"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1011084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1011084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1011084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}