{"id":962770,"date":"2024-12-27T04:11:22","date_gmt":"2024-12-26T20:11:22","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/962770.html"},"modified":"2024-12-27T04:11:25","modified_gmt":"2024-12-26T20:11:25","slug":"%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%8564%e4%bd%8dpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/962770.html","title":{"rendered":"\u5982\u4f55\u5b89\u88c564\u4f4dpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25104628\/ae4708ca-bfec-4198-9e8a-e90b1922f0ab.webp\" alt=\"\u5982\u4f55\u5b89\u88c564\u4f4dpython\" \/><\/p>\n<p><p> <strong>\u5b89\u88c564\u4f4dPython\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u3001\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/strong>\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u662f\u5173\u952e\uff0c\u56e0\u4e3a\u4e0d\u540c\u7248\u672c\u652f\u6301\u7684\u5e93\u548c\u529f\u80fd\u6709\u6240\u4e0d\u540c\u3002\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u65f6\uff0c\u786e\u4fdd\u9009\u62e964\u4f4d\u7248\u672c\uff0c\u4ee5\u4fbf\u5145\u5206\u5229\u7528\u73b0\u4ee3\u8ba1\u7b97\u673a\u7684\u5185\u5b58\u548c\u6027\u80fd\u3002\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u65f6\uff0c\u5efa\u8bae\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u63a7\u5236\u5b89\u88c5\u9009\u9879\u3002\u6700\u540e\uff0c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u53ef\u786e\u4fddPython\u5728\u547d\u4ee4\u884c\u4e2d\u5168\u5c40\u53ef\u7528\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u6bcf\u4e2a\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c<\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u81f3\u5173\u91cd\u8981\u3002Python\u7684\u7248\u672c\u66f4\u65b0\u9891\u7e41\uff0c\u4e0d\u540c\u7248\u672c\u4e4b\u95f4\u53ef\u80fd\u5b58\u5728\u4e0d\u517c\u5bb9\u7684\u53d8\u5316\u3002\u56e0\u6b64\uff0c\u5728\u5b89\u88c5\u4e4b\u524d\uff0c\u9700\u8981\u4e86\u89e3\u5f53\u524d\u9879\u76ee\u6216\u4efb\u52a1\u5bf9Python\u7248\u672c\u7684\u8981\u6c42\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e86\u89e3\u9879\u76ee\u9700\u6c42<\/strong><br \/>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7279\u5b9a\u7684\u9879\u76ee\u53ef\u80fd\u8981\u6c42\u4f7f\u7528\u7279\u5b9a\u7248\u672c\u7684Python\u3002\u4f8b\u5982\uff0c\u4e00\u4e9b\u65e7\u9879\u76ee\u53ef\u80fd\u9700\u8981Python 2.x\uff0c\u800c\u65b0\u7684\u9879\u76ee\u901a\u5e38\u5efa\u8bae\u4f7f\u7528Python 3.x\u3002\u56e0\u6b64\uff0c\u4e86\u89e3\u9879\u76ee\u9700\u6c42\u662f\u9009\u62e9\u7248\u672c\u7684\u7b2c\u4e00\u6b65\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u67e5\u770b\u6700\u65b0\u7a33\u5b9a\u7248\u672c<\/strong><br \/>Python\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org%EF%BC%89%E4%BC%9A%E6%98%BE%E7%A4%BA%E6%9C%80%E6%96%B0%E7%9A%84%E7%A8%B3%E5%AE%9A%E7%89%88%E6%9C%AC%E3%80%82%E9%80%9A%E5%B8%B8%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E9%80%89%E6%8B%A9%E6%9C%80%E6%96%B0%E7%9A%84%E7%A8%B3%E5%AE%9A%E7%89%88%E6%9C%AC%E8%83%BD%E7%A1%AE%E4%BF%9D%E8%8E%B7%E5%BE%97%E6%9C%80%E6%96%B0%E7%9A%84%E5%8A%9F%E8%83%BD%E5%92%8C%E5%AE%89%E5%85%A8%E6%9B%B4%E6%96%B0%E3%80%82\">https:\/\/www.python.org\uff09\u4f1a\u663e\u793a\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u80fd\u786e\u4fdd\u83b7\u5f97\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u66f4\u65b0\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8003\u8651\u7b2c\u4e09\u65b9\u5e93\u7684\u517c\u5bb9\u6027<\/strong><br \/>\u5982\u679c\u9700\u8981\u4f7f\u7528\u7279\u5b9a\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u68c0\u67e5\u8fd9\u4e9b\u5e93\u662f\u5426\u4e0e\u6240\u9009\u7684Python\u7248\u672c\u517c\u5bb9\u3002\u4f8b\u5982\uff0c\u6709\u4e9b\u5e93\u5728\u8f83\u65b0\u7248\u672c\u7684Python\u4e2d\u53ef\u80fd\u5c1a\u672a\u66f4\u65b0\uff0c\u56e0\u6b64\u9700\u8981\u5728\u5b89\u88c5\u524d\u8fdb\u884c\u786e\u8ba4\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u786e\u5b9a\u4e86\u8981\u5b89\u88c5\u7684Python\u7248\u672c\uff0c\u63a5\u4e0b\u6765\u5c31\u662f\u4e0b\u8f7d\u76f8\u5e94\u7684\u5b89\u88c5\u5305\u3002Python\u5b98\u65b9\u7f51\u7ad9\u63d0\u4f9b\u4e86\u6240\u6709\u7248\u672c\u7684\u5b89\u88c5\u5305\u4e0b\u8f7d\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbf\u95eePython\u5b98\u7f51\u4e0b\u8f7d\u9875\u9762<\/strong><br \/>\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00Python\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org%EF%BC%89%EF%BC%8C%E5%AF%BC%E8%88%AA%E5%88%B0%E2%80%9CDownloads%E2%80%9D%E9%A1%B5%E9%9D%A2%E3%80%82%E5%9C%A8%E6%AD%A4%E9%A1%B5%E9%9D%A2%E4%B8%AD%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E7%9C%8B%E5%88%B0%E6%9C%80%E6%96%B0%E7%9A%84Python%E7%89%88%E6%9C%AC%E3%80%82\">https:\/\/www.python.org\uff09\uff0c\u5bfc\u822a\u5230\u201cDownloads\u201d\u9875\u9762\u3002\u5728\u6b64\u9875\u9762\u4e2d\uff0c\u60a8\u53ef\u4ee5\u770b\u5230\u6700\u65b0\u7684Python\u7248\u672c\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9\u64cd\u4f5c\u7cfb\u7edf\u548c\u7248\u672c<\/strong><br \/>\u4e0b\u8f7d\u9875\u9762\u4f1a\u6839\u636e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u81ea\u52a8\u63a8\u8350\u5408\u9002\u7684\u7248\u672c\u3002\u786e\u4fdd\u9009\u62e964\u4f4d\u7248\u672c\u7684\u5b89\u88c5\u5305\uff0c\u901a\u5e38\u6807\u8bb0\u4e3a\u201cWindows x86-64 executable installer\u201d\u6216\u7c7b\u4f3c\u8bf4\u660e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4e0b\u8f7d\u5b89\u88c5\u5305<\/strong><br \/>\u5355\u51fb\u4e0b\u8f7d\u94fe\u63a5\uff0c\u4fdd\u5b58\u5b89\u88c5\u5305\u5230\u672c\u5730\u8ba1\u7b97\u673a\u3002\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\u901a\u5e38\u662f\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe\uff09\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884cPython\u5b89\u88c5\u7a0b\u5e8f\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u9009\u62e9\u9ed8\u8ba4\u5b89\u88c5\u6216\u8005\u81ea\u5b9a\u4e49\u5b89\u88c5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u542f\u52a8\u5b89\u88c5\u7a0b\u5e8f<\/strong><br \/>\u53cc\u51fb\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\u4ee5\u542f\u52a8\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u5f39\u51fa\u4e00\u4e2a\u5b89\u88c5\u5411\u5bfc\uff0c\u6307\u5bfc\u60a8\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9\u5b89\u88c5\u9009\u9879<\/strong><br \/>\u5728\u5b89\u88c5\u5411\u5bfc\u7684\u7b2c\u4e00\u6b65\uff0c\u5efa\u8bae\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\uff0c\u65b9\u4fbf\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u81ea\u5b9a\u4e49\u5b89\u88c5<\/strong><br \/>\u5982\u679c\u9700\u8981\u7279\u5b9a\u7684\u5b89\u88c5\u76ee\u5f55\u6216\u7ec4\u4ef6\uff0c\u9009\u62e9\u201cCustomize installation\u201d\u9009\u9879\u3002\u53ef\u4ee5\u5728\u6b64\u6b65\u9aa4\u4e2d\u9009\u62e9\u5b89\u88c5pip\u3001\u6587\u6863\u548c\u5176\u4ed6\u53ef\u9009\u7ec4\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b8c\u6210\u5b89\u88c5<\/strong><br \/>\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u7684\u6b65\u9aa4\u5b8c\u6210\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u201cStart\u201d\u83dc\u5355\u4e2d\u627e\u5230Python\u7684\u5feb\u6377\u65b9\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u786e\u4fddPython\u5728\u547d\u4ee4\u884c\u4e2d\u53ef\u7528\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u6ca1\u6709\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u5219\u9700\u8981\u624b\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\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\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002\u5728\u5f39\u51fa\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>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><br \/>\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u201cPath\u201d\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0Python\u8def\u5f84<\/strong><br \/>\u5728\u201c\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u65b0\u5efa\u201d\uff0c\u7136\u540e\u8f93\u5165Python\u7684\u5b89\u88c5\u8def\u5f84\uff08\u4f8b\u5982\uff1aC:\\Python39\\\uff09\u3002\u540c\u6837\uff0c\u6dfb\u52a0Scripts\u76ee\u5f55\u7684\u8def\u5f84\uff08\u4f8b\u5982\uff1aC:\\Python39\\Scripts\\\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u66f4\u6539<\/strong><br \/>\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u4fdd\u5b58\u66f4\u6539\uff0c\u5173\u95ed\u6240\u6709\u7a97\u53e3\u3002\u6b64\u65f6\uff0cPython\u5e94\u5df2\u6210\u529f\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u9a8c\u8bc1\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u5b8c\u6210\u5b89\u88c5\u548c\u914d\u7f6e\u540e\uff0c\u6700\u540e\u4e00\u6b65\u662f\u9a8c\u8bc1Python\u662f\u5426\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26<\/strong><br \/>\u4f7f\u7528\u5feb\u6377\u952e\u201cWin + R\u201d\u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201ccmd\u201d\u5e76\u6309\u4e0b\u56de\u8f66\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1Python\u5b89\u88c5<\/strong><br \/>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython &#8211;version\u201d\uff0c\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u5c06\u663e\u793aPython\u7684\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1pip\u5b89\u88c5<\/strong><br \/>\u540c\u6837\uff0c\u53ef\u4ee5\u8f93\u5165\u201cpip &#8211;version\u201d\u9a8c\u8bc1pip\u662f\u5426\u6b63\u786e\u5b89\u88c5\u3002pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython<\/strong><br \/>\u901a\u8fc7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython\u201d\u542f\u52a8Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\uff0c\u786e\u4fddPython\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u5b89\u88c5\u5e38\u7528\u5e93<\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u540e\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684\u5e93\u6765\u652f\u6301\u5f00\u53d1\u5de5\u4f5c\u3002\u4f7f\u7528pip\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5\u8fd9\u4e9b\u5e93\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5NumPy<\/strong><br \/>NumPy\u662f\u4e00\u4e2a\u7528\u4e8e\u79d1\u5b66\u8ba1\u7b97\u7684\u57fa\u7840\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u201cpip install numpy\u201d\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Pandas<\/strong><br \/>Pandas\u662f\u4e00\u4e2a\u7528\u4e8e\u6570\u636e\u5206\u6790\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u7ed3\u6784\u3002\u4f7f\u7528\u201cpip install pandas\u201d\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Matplotlib<\/strong><br \/>Matplotlib\u662f\u4e00\u4e2a\u7528\u4e8e\u7ed8\u5236\u56fe\u5f62\u7684\u5e93\uff0c\u9002\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u3002\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u201cpip install matplotlib\u201d\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u5176\u4ed6\u5e93<\/strong><br \/>\u6839\u636e\u9879\u76ee\u9700\u6c42\uff0c\u53ef\u80fd\u8fd8\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u8f7b\u677e\u5b89\u88c5\u548c\u7ba1\u7406\u8fd9\u4e9b\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u89e3\u51b3\u5b89\u88c5\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6743\u9650\u95ee\u9898<\/strong><br \/>\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9047\u5230\u6743\u9650\u4e0d\u8db3\u7684\u95ee\u9898\uff0c\u5c1d\u8bd5\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002\u53f3\u952e\u5355\u51fb\u5b89\u88c5\u5305\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u9519\u8bef<\/strong><br \/>\u5982\u679c\u5b89\u88c5\u540e\u65e0\u6cd5\u5728\u547d\u4ee4\u884c\u4e2d\u4f7f\u7528Python\uff0c\u53ef\u80fd\u662f\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u9519\u8bef\u3002\u68c0\u67e5Path\u53d8\u91cf\u4e2d\u7684Python\u8def\u5f84\u662f\u5426\u6b63\u786e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>pip\u65e0\u6cd5\u4f7f\u7528<\/strong><br \/>\u5982\u679cpip\u547d\u4ee4\u65e0\u6cd5\u4f7f\u7528\uff0c\u53ef\u80fd\u662fpip\u6ca1\u6709\u6b63\u786e\u5b89\u88c5\u3002\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u65b0\u5b89\u88c5Python\uff0c\u5e76\u786e\u4fdd\u9009\u62e9\u5b89\u88c5pip\u9009\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u51b2\u7a81<\/strong><br \/>\u5728\u5b89\u88c5\u591a\u4e2a\u7248\u672c\u7684Python\u65f6\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7248\u672c\u51b2\u7a81\u3002\u786e\u4fdd\u5728\u4f7f\u7528\u65f6\u6307\u5b9a\u6b63\u786e\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u6210\u529f\u5b89\u88c564\u4f4dPython\uff0c\u5e76\u914d\u7f6e\u597d\u76f8\u5173\u73af\u5883\u4ee5\u652f\u6301\u5f00\u53d1\u5de5\u4f5c\u3002Python\u7684\u5f3a\u5927\u529f\u80fd\u548c\u5e7f\u6cdb\u7684\u793e\u533a\u652f\u6301\u4f7f\u5176\u6210\u4e3a\u73b0\u4ee3\u7f16\u7a0b\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u5de5\u5177\u3002\u65e0\u8bba\u662f\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u8fd8\u662fWeb\u5f00\u53d1\uff0cPython\u90fd\u80fd\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u768464\u4f4dPython\u7248\u672c\u8fdb\u884c\u5b89\u88c5\uff1f<\/strong><br \/>\u5728\u9009\u62e964\u4f4dPython\u7248\u672c\u65f6\uff0c\u9996\u5148\u8981\u8003\u8651\u64cd\u4f5c\u7cfb\u7edf\u7684\u517c\u5bb9\u6027\u3002\u786e\u4fdd\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u652f\u630164\u4f4d\u5e94\u7528\u7a0b\u5e8f\uff0c\u6bd4\u5982Windows 10 64\u4f4d\u3001macOS\u6216Linux 64\u4f4d\u53d1\u884c\u7248\u3002\u63a5\u7740\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u67e5\u770b\u6700\u65b0\u7248\u672c\u4ee5\u53ca\u5176\u5bf9\u5e94\u768464\u4f4d\u5b89\u88c5\u5305\u3002\u901a\u5e38\uff0c\u63a8\u8350\u9009\u62e9\u7a33\u5b9a\u7684\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u4fbf\u83b7\u5f97\u6700\u65b0\u7684\u7279\u6027\u548c\u5b89\u5168\u66f4\u65b0\u3002<\/p>\n<p><strong>\u5b89\u88c564\u4f4dPython\u65f6\u9700\u8981\u6ce8\u610f\u54ea\u4e9b\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\uff1f<\/strong><br \/>\u5728\u5b89\u88c564\u4f4dPython\u4e4b\u540e\uff0c\u786e\u4fdd\u5c06Python\u7684\u5b89\u88c5\u76ee\u5f55\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u8fd9\u5c06\u5141\u8bb8\u4f60\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u4e2d\u7684\u201c\u73af\u5883\u53d8\u91cf\u201d\u8bbe\u7f6e\u8fdb\u884c\u6dfb\u52a0\u3002\u5bf9\u4e8eLinux\u7528\u6237\uff0c\u901a\u5e38\u9700\u8981\u5728<del>\/.bashrc\u6216<\/del>\/.bash_profile\u6587\u4ef6\u4e2d\u589e\u52a0PATH\u53d8\u91cf\uff0c\u786e\u4fddPython\u7684\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u88ab\u6b63\u786e\u5f15\u7528\u3002<\/p>\n<p><strong>\u5982\u4f55\u9a8c\u8bc164\u4f4dPython\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1f<\/strong><br \/>\u5b8c\u621064\u4f4dPython\u5b89\u88c5\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u9a8c\u8bc1\u5176\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5728Windows\u4e2d\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u67e5\u770b\u5f53\u524dPython\u7248\u672c\u3002\u5982\u679c\u8fd4\u56de\u7684\u4fe1\u606f\u663e\u793a\u4e3a64\u4f4d\u7248\u672c\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u5728Linux\u6216macOS\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u76f8\u540c\u7684\u547d\u4ee4\u8fdb\u884c\u9a8c\u8bc1\uff0c\u786e\u4fdd\u7ec8\u7aef\u4e2d\u663e\u793a\u7684\u7248\u672c\u4fe1\u606f\u6b63\u786e\u65e0\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5b89\u88c564\u4f4dPython\u7684\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u3001\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af [&hellip;]","protected":false},"author":3,"featured_media":962780,"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\/962770"}],"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=962770"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/962770\/revisions"}],"predecessor-version":[{"id":962781,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/962770\/revisions\/962781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/962780"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=962770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=962770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=962770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}