{"id":1053713,"date":"2024-12-31T14:36:11","date_gmt":"2024-12-31T06:36:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1053713.html"},"modified":"2024-12-31T14:36:14","modified_gmt":"2024-12-31T06:36:14","slug":"windows10%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85python3","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1053713.html","title":{"rendered":"windows10\u5982\u4f55\u5b89\u88c5python3"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/08718e1d-2d6d-49ad-a0ad-d75120237111.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"windows10\u5982\u4f55\u5b89\u88c5python3\" \/><\/p>\n<p><p> <strong>\u5728Windows 10\u4e0a\u5b89\u88c5Python 3\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u4e0b\u8f7dPython\u5b89\u88c5\u7a0b\u5e8f\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u9a8c\u8bc1\u5b89\u88c5\u3002<\/strong> \u5176\u4e2d\uff0c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u4e00\u4e2a\u5173\u952e\u6b65\u9aa4\uff0c\u53ef\u4ee5\u786e\u4fdd\u6211\u4eec\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u800c\u65e0\u9700\u6307\u5b9a\u5b8c\u6574\u7684\u8def\u5f84\u3002\u4ee5\u4e0b\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u5728Windows 10\u4e0a\u5b89\u88c5Python 3\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4e0b\u8f7dPython\u5b89\u88c5\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9 (<a href=\"https:\/\/www.python.org\/)%E3%80%82%E5%9C%A8%E4%B8%BB%E9%A1%B5%E4%B8%8A%EF%BC%8C%E6%82%A8%E4%BC%9A%E7%9C%8B%E5%88%B0%E2%80%9CDownloads%E2%80%9D%E8%8F%9C%E5%8D%95%E9%A1%B9%EF%BC%8C%E9%BC%A0%E6%A0%87%E6%82%AC%E5%81%9C%E5%9C%A8%E4%B8%8A%E9%9D%A2%E5%90%8E%EF%BC%8C%E9%80%89%E6%8B%A9%E2%80%9CWindows%E2%80%9D%E3%80%82%E6%8E%A5%E7%9D%80%EF%BC%8C%E6%82%A8%E4%BC%9A%E7%9C%8B%E5%88%B0%E4%B8%8D%E5%90%8C%E7%89%88%E6%9C%AC%E7%9A%84Python%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%EF%BC%8C%E7%82%B9%E5%87%BB%E2%80%9CDownload\">https:\/\/www.python.org\/)\u3002\u5728\u4e3b\u9875\u4e0a\uff0c\u60a8\u4f1a\u770b\u5230\u201cDownloads\u201d\u83dc\u5355\u9879\uff0c\u9f20\u6807\u60ac\u505c\u5728\u4e0a\u9762\u540e\uff0c\u9009\u62e9\u201cWindows\u201d\u3002\u63a5\u7740\uff0c\u60a8\u4f1a\u770b\u5230\u4e0d\u540c\u7248\u672c\u7684Python\u5b89\u88c5\u7a0b\u5e8f\uff0c\u70b9\u51fb\u201cDownload<\/a> Python 3.x.x\u201d\u6309\u94ae\uff08\u5177\u4f53\u7684\u7248\u672c\u53f7\u4f1a\u56e0\u65f6\u95f4\u800c\u6709\u6240\u4e0d\u540c\uff09\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u4e0b\u8f7d\u7684\u5b89\u88c5\u7a0b\u5e8f\u4ee5\u542f\u52a8\u5b89\u88c5\u5411\u5bfc\u3002\u5728\u5b89\u88c5\u5411\u5bfc\u7684\u7b2c\u4e00\u4e2a\u7a97\u53e3\u4e2d\uff0c\u60a8\u4f1a\u770b\u5230\u4e00\u4e2a\u590d\u9009\u6846\uff0c\u6807\u8bb0\u4e3a\u201cAdd Python 3.x to PATH\u201d\uff0c\u8bf7\u52a1\u5fc5\u9009\u4e2d\u5b83\uff0c\u8fd9\u5c06\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u7136\u540e\uff0c\u70b9\u51fb\u201cInstall Now\u201d\u6309\u94ae\u5f00\u59cb\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u65f6\u95f4\uff0c\u5b8c\u6210\u540e\uff0c\u60a8\u4f1a\u770b\u5230\u4e00\u4e2a\u5b8c\u6210\u7684\u6d88\u606f\u7a97\u53e3\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u5982\u679c\u60a8\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u6ca1\u6709\u9009\u62e9\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u60a8\u9700\u8981\u624b\u52a8\u8fdb\u884c\u914d\u7f6e\u3002\u4ee5\u4e0b\u662f\u624b\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u56fe\u6807\uff0c\u7136\u540e\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li>\u5728\u5de6\u4fa7\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/li>\n<li>\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u5e76\u9009\u62e9\u201cPath\u201d\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u6309\u94ae\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u65b0\u5efa\u201d\u6309\u94ae\uff0c\u7136\u540e\u8f93\u5165Python\u5b89\u88c5\u8def\u5f84\uff08\u901a\u5e38\u662f\u201cC:\\Python3x\u201d\uff09\uff0c\u4ee5\u53caScripts\u76ee\u5f55\u7684\u8def\u5f84\uff08\u4f8b\u5982\u201cC:\\Python3x\\Scripts\u201d\uff09\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u9a8c\u8bc1\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9aa4\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08\u6309Win+R\u952e\uff0c\u8f93\u5165cmd\uff0c\u7136\u540e\u6309Enter\u952e\uff09\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u9a8c\u8bc1Python\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u60a8\u4f1a\u770b\u5230Python\u7684\u7248\u672c\u53f7\u3002\u63a5\u7740\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u9a8c\u8bc1pip\uff08Python\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff09\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4ee5\u4e0a\u547d\u4ee4\u5e94\u8be5\u8fd4\u56depip\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5b89\u88c5\u5e38\u7528\u7684Python\u5e93<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8cPython\u540e\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684Python\u5e93\uff0c\u4f8b\u5982NumPy\u3001Pandas\u3001Matplotlib\u7b49\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528pip\u6765\u5b89\u88c5\u8fd9\u4e9b\u5e93\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install numpy<\/p>\n<p>pip install pandas<\/p>\n<p>pip install matplotlib<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e9b\u547d\u4ee4\u5c06\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u76f8\u5e94\u7684\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u914d\u7f6eIDLE\uff08\u53ef\u9009\uff09<\/p>\n<\/p>\n<p><p>\u867d\u7136\u60a8\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u6765\u8fd0\u884cPython\u811a\u672c\uff0c\u4f46\u4f7f\u7528\u4e00\u4e2a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4f1a\u66f4\u65b9\u4fbf\u3002Python\u81ea\u5e26\u7684IDLE\u662f\u4e00\u4e2a\u7b80\u5355\u7684IDE\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5f00\u59cb\u83dc\u5355\u627e\u5230\u5e76\u542f\u52a8\u5b83\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u7ea7\u7684\u529f\u80fd\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u5176\u4ed6\u7684IDE\uff0c\u4f8b\u5982PyCharm\u3001VS Code\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u521b\u5efa\u548c\u8fd0\u884c\u7b2c\u4e00\u4e2aPython\u811a\u672c<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u5e76\u8fd0\u884c\u60a8\u7684\u7b2c\u4e00\u4e2aPython\u811a\u672c\u3002\u6253\u5f00\u4e00\u4e2a\u6587\u672c\u7f16\u8f91\u5668\uff08\u4f8b\u5982Notepad\uff09\uff0c\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06\u6587\u4ef6\u4fdd\u5b58\u4e3a\u201chello.py\u201d\u3002\u7136\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u8fd0\u884c\u811a\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u60a8\u5e94\u8be5\u4f1a\u770b\u5230\u8f93\u51fa\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u548c\u4f7f\u7528Python\u7684\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Python\u7248\u672c\u51b2\u7a81<\/strong>\uff1a\u5982\u679c\u60a8\u7684\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86\u5176\u4ed6\u7248\u672c\u7684Python\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7248\u672c\u51b2\u7a81\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5378\u8f7d\u65e7\u7248\u672c\u6216\u4f7f\u7528\u865a\u62df\u73af\u5883\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/li>\n<li><strong>\u7f3a\u5c11pip<\/strong>\uff1a\u5982\u679cpip\u672a\u6b63\u786e\u5b89\u88c5\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u91cd\u65b0\u5b89\u88c5Python\u6216\u624b\u52a8\u5b89\u88c5pip\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002\u624b\u52a8\u5b89\u88c5pip\u7684\u65b9\u6cd5\u53ef\u4ee5\u5728Python\u5b98\u65b9\u7f51\u7ad9\u4e0a\u627e\u5230\u3002<\/li>\n<li><strong>\u6743\u9650\u95ee\u9898<\/strong>\uff1a\u5728\u5b89\u88c5\u6216\u8fd0\u884cPython\u65f6\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u6743\u9650\u95ee\u9898\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u547d\u4ee4\u63d0\u793a\u7b26\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5728Windows 10\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86Python 3\u3002\u63a5\u4e0b\u6765\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u5b66\u4e60\u548c\u4f7f\u7528Python\u6765\u7f16\u5199\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Windows 10\u4e0a\u4e0b\u8f7dPython 3\u7684\u5b89\u88c5\u5305\uff1f<\/strong><br \/>\u8981\u5728Windows 10\u4e0a\u4e0b\u8f7dPython 3\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u3002\u5728\u9996\u9875\u4e2d\uff0c\u627e\u5230\u201cDownloads\u201d\u9009\u9879\u5361\uff0c\u7f51\u7ad9\u4f1a\u81ea\u52a8\u63a8\u8350\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u6700\u65b0\u7248\u672c\u3002\u70b9\u51fb\u4e0b\u8f7d\u94fe\u63a5\uff0c\u60a8\u5c06\u83b7\u5f97\u4e00\u4e2a\u53ef\u6267\u884c\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u901a\u5e38\u662f\u4e00\u4e2a\u4ee5\u201c.exe\u201d\u7ed3\u5c3e\u7684\u6587\u4ef6\u3002<\/p>\n<p><strong>\u5b89\u88c5Python 3\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u9009\u9879\uff1f<\/strong><br \/>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u63d0\u4f9b\u591a\u4e2a\u9009\u9879\u3002\u52a1\u5fc5\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u4f7f\u60a8\u80fd\u591f\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f7b\u677e\u8bbf\u95eePython\u3002\u6b64\u5916\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u201cCustomize installation\u201d\u4ee5\u67e5\u770b\u5176\u4ed6\u9009\u9879\uff0c\u5982\u5b89\u88c5pip\uff08Python\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff09\u548c\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7b49\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u8ba4Python 3\u662f\u5426\u6210\u529f\u5b89\u88c5\u5728Windows 10\u4e0a\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u201cpython &#8211;version\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u3002\u5982\u679cPython\u5b89\u88c5\u6210\u529f\uff0c\u60a8\u5c06\u770b\u5230\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002\u5982\u679c\u51fa\u73b0\u9519\u8bef\u4fe1\u606f\uff0c\u53ef\u80fd\u9700\u8981\u68c0\u67e5\u5b89\u88c5\u8fc7\u7a0b\u6216\u8def\u5f84\u8bbe\u7f6e\u662f\u5426\u6b63\u786e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Windows 10\u4e0a\u5b89\u88c5Python 3\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u4e0b\u8f7dPython\u5b89\u88c5\u7a0b\u5e8f\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1053726,"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\/1053713"}],"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=1053713"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1053713\/revisions"}],"predecessor-version":[{"id":1053729,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1053713\/revisions\/1053729"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1053726"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1053713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1053713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1053713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}