{"id":1069980,"date":"2025-01-08T10:54:02","date_gmt":"2025-01-08T02:54:02","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1069980.html"},"modified":"2025-01-08T10:54:04","modified_gmt":"2025-01-08T02:54:04","slug":"win10%e7%b3%bb%e7%bb%9fpython%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1069980.html","title":{"rendered":"win10\u7cfb\u7edfpython\u5982\u4f55\u914d\u7f6e\u73af\u5883"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100813\/45fe4c60-30ac-4ebb-9cb9-a2e4213618ef.webp\" alt=\"win10\u7cfb\u7edfpython\u5982\u4f55\u914d\u7f6e\u73af\u5883\" \/><\/p>\n<p><p> <strong>\u5728Win10\u7cfb\u7edf\u4e2d\u914d\u7f6ePython\u73af\u5883\u7684\u65b9\u6cd5\u6709\uff1a\u4e0b\u8f7d\u5b89\u88c5Python\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u5b89\u88c5\u5e38\u7528IDE\u3001\u5b89\u88c5pip\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u3002<\/strong>\u5176\u4e2d\uff0c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u662f\u6700\u5173\u952e\u7684\u4e00\u6b65\uff0c\u56e0\u4e3a\u8fd9\u5c06\u786e\u4fdd\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u5168\u5c40\u8c03\u7528Python\u6267\u884c\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e0b\u8f7d\u5b89\u88c5Python<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6253\u5f00Python\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E4%B8%8B%E8%BD%BD%E9%80%82%E7%94%A8%E4%BA%8EWindows%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%89%E8%A3%85%E5%8C%85%E3%80%82%E9%80%89%E6%8B%A9%E6%9C%80%E6%96%B0%E7%A8%B3%E5%AE%9A%E7%89%88%E7%9A%84Python%EF%BC%8C%E4%B8%8B%E8%BD%BD%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E8%BF%90%E8%A1%8C%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%E3%80%82\">https:\/\/www.python.org\/\uff09\uff0c\u4e0b\u8f7d\u9002\u7528\u4e8eWindows\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u9009\u62e9\u6700\u65b0\u7a33\u5b9a\u7248\u7684Python\uff0c\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002<\/a><\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u52a1\u5fc5\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u4f1a\u81ea\u52a8\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u968f\u540e\uff0c\u9009\u62e9\u201cCustomize installation\u201d\u4ee5\u4fbf\u4e8e\u81ea\u5b9a\u4e49\u5b89\u88c5\u7ec4\u4ef6\u3002\u786e\u4fdd\u52fe\u9009\u201cpip\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u5b89\u88c5Python\u5305\u7ba1\u7406\u5de5\u5177\u3002\u5b8c\u6210\u8fd9\u4e9b\u8bbe\u7f6e\u540e\uff0c\u70b9\u51fb\u201cInstall Now\u201d\u5f00\u59cb\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5c3d\u7ba1\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u62e9\u4e86\u5c06Python\u6dfb\u52a0\u5230PATH\uff0c\u4f46\u4e3a\u4e86\u786e\u4fdd\u73af\u5883\u914d\u7f6e\u65e0\u8bef\uff0c\u53ef\u4ee5\u624b\u52a8\u68c0\u67e5\u5e76\u6dfb\u52a0\u76f8\u5e94\u7684\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u56fe\u6807\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\u6309\u94ae\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u5e76\u9009\u4e2d\u201cPath\u201d\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002<\/li>\n<li>\u5728\u201c\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u786e\u4fdd\u5b58\u5728Python\u5b89\u88c5\u76ee\u5f55\u53ca\u5176Scripts\u5b50\u76ee\u5f55\u7684\u8def\u5f84\uff08\u4f8b\u5982C:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python39\u548cC:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python39\\Scripts\uff09\u3002\u82e5\u4e0d\u5b58\u5728\uff0c\u624b\u52a8\u6dfb\u52a0\u8fd9\u4e24\u4e2a\u8def\u5f84\u3002<\/li>\n<\/ol>\n<p><p><strong>\u5b89\u88c5\u5e38\u7528IDE<\/strong><\/p>\n<\/p>\n<p><p>Python\u5f00\u53d1\u9700\u8981\u4e00\u4e2a\u9ad8\u6548\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002\u5e38\u7528\u7684IDE\u6709PyCharm\u3001VS Code\u7b49\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>PyCharm<\/strong>\uff1a\u524d\u5f80JetBrains\u5b98\u7f51\uff08<a href=\"https:\/\/www.jetbrains.com\/pycharm\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E7%A4%BE%E5%8C%BA%E7%89%88%EF%BC%88%E5%85%8D%E8%B4%B9%EF%BC%89%E6%88%96%E4%B8%93%E4%B8%9A%E7%89%88%EF%BC%88%E4%BB%98%E8%B4%B9%EF%BC%89%E3%80%82%E5%AE%89%E8%A3%85%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E6%89%93%E5%BC%80PyCharm%EF%BC%8C%E8%BF%9B%E8%A1%8C%E5%9F%BA%E7%A1%80%E8%AE%BE%E7%BD%AE%EF%BC%8C%E7%A1%AE%E4%BF%9D%E9%80%89%E6%8B%A9%E6%AD%A3%E7%A1%AE%E7%9A%84Python%E8%A7%A3%E9%87%8A%E5%99%A8%E3%80%82\">https:\/\/www.jetbr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns.com\/pycharm\/\uff09\u4e0b\u8f7d\u793e\u533a\u7248\uff08\u514d\u8d39\uff09\u6216\u4e13\u4e1a\u7248\uff08\u4ed8\u8d39\uff09\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00PyCharm\uff0c\u8fdb\u884c\u57fa\u7840\u8bbe\u7f6e\uff0c\u786e\u4fdd\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>VS Code<\/strong>\uff1a\u524d\u5f80Visual Studio Code\u5b98\u7f51\uff08<a href=\"https:\/\/code.visualstudio.com\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85VS\">https:\/\/code.visualstudio.com\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5VS<\/a> Code\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00VS Code\uff0c\u5b89\u88c5Python\u6269\u5c55\uff08\u5728\u6269\u5c55\u5e02\u573a\u4e2d\u641c\u7d22Python\u5e76\u5b89\u88c5\uff09\u3002\u7136\u540e\uff0c\u914d\u7f6ePython\u89e3\u91ca\u5668\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p><strong>\u5b89\u88c5pip<\/strong><\/p>\n<\/p>\n<p><p>Pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002\u901a\u5e38\u5728\u5b89\u88c5Python\u65f6\uff0cpip\u4f1a\u4e00\u540c\u5b89\u88c5\u3002\u5982\u679c\u672a\u5b89\u88c5\u6216\u9700\u8981\u66f4\u65b0pip\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5b8c\u6210\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5pip\u7248\u672c\uff1a\n<pre><code class=\"language-shell\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u82e5pip\u672a\u5b89\u88c5\u6216\u9700\u8981\u66f4\u65b0\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u6216\u66f4\u65b0pip\uff1a\n<pre><code class=\"language-shell\">python -m ensurepip --upgrade<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p><strong>\u5b89\u88c5\u5e38\u7528Python\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5\u5e38\u7528Python\u5305\u3002\u4f8b\u5982\uff0c\u5b89\u88c5NumPy\u548cPandas\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install numpy<\/p>\n<p>pip install pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u9a8c\u8bc1\u73af\u5883\u914d\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u73af\u5883\u914d\u7f6e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python --version<\/p>\n<p>pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u82e5\u663e\u793aPython\u548cpip\u7684\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u73af\u5883\u914d\u7f6e\u6210\u529f\u3002\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff08\u4f8b\u5982test.py\uff09\uff0c\u5199\u5165\u7b80\u5355\u7684Python\u4ee3\u7801\uff08\u4f8b\u5982print(&quot;Hello, World!&quot;)\uff09\uff0c\u5e76\u8fd0\u884c\u8be5\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python test.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u8f93\u51fa\u201cHello, World!\u201d\uff0c\u5219\u8868\u660ePython\u73af\u5883\u914d\u7f6e\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4e0b\u8f7d\u5b89\u88c5Python<\/h3>\n<\/p>\n<p><p><strong>\u9009\u62e9\u9002\u5408\u7684Python\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u5b98\u7f51\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8A%EF%BC%8C%E6%9C%89%E5%A4%9A%E4%B8%AA%E7%89%88%E6%9C%AC%E5%8F%AF%E4%BE%9B%E9%80%89%E6%8B%A9%E3%80%82%E9%80%9A%E5%B8%B8%E5%BB%BA%E8%AE%AE%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%EF%BC%8C%E4%BE%8B%E5%A6%82Python\">https:\/\/www.python.org\/\uff09\u4e0a\uff0c\u6709\u591a\u4e2a\u7248\u672c\u53ef\u4f9b\u9009\u62e9\u3002\u901a\u5e38\u5efa\u8bae\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u4f8b\u5982Python<\/a> 3.9\u62163.10\u3002\u6bcf\u4e2a\u7248\u672c\u90fd\u6709\u5bf9\u5e94\u7684\u66f4\u65b0\u65e5\u5fd7\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p><strong>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/strong><\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5\u5411\u5bfc\u4e2d\uff0c\u9996\u5148\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u81ea\u52a8\u6dfb\u52a0Python\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u3002\u7136\u540e\u9009\u62e9\u201cCustomize installation\u201d\u4ee5\u8fdb\u884c\u81ea\u5b9a\u4e49\u5b89\u88c5\uff0c\u786e\u4fdd\u52fe\u9009\u201cpip\u201d\u548c\u201cIDLE\u201d\u9009\u9879\uff0c\u8fd9\u4e9b\u7ec4\u4ef6\u5bf9\u4e8ePython\u5f00\u53d1\u975e\u5e38\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p><strong>\u81ea\u5b9a\u4e49\u5b89\u88c5\u76ee\u5f55<\/strong><\/p>\n<\/p>\n<p><p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPython\u5c06\u5b89\u88c5\u5728\u7528\u6237\u76ee\u5f55\u4e0b\u3002\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5\u76ee\u5f55\uff0c\u4f8b\u5982\u5b89\u88c5\u5728D\u76d8\u4ee5\u907f\u514d\u7cfb\u7edf\u76d8\u7a7a\u95f4\u5360\u7528\u3002\u70b9\u51fb\u201cInstall Now\u201d\u5f00\u59cb\u5b89\u88c5\uff0c\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u201cClose\u201d\u5173\u95ed\u5b89\u88c5\u5411\u5bfc\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p><strong>\u68c0\u67e5\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5Python\u65f6\uff0c\u82e5\u52fe\u9009\u4e86\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u5e94\u8be5\u5df2\u7ecf\u5305\u542bPython\u8def\u5f84\u3002\u4e3a\u4e86\u786e\u4fdd\u914d\u7f6e\u6b63\u786e\uff0c\u53ef\u4ee5\u624b\u52a8\u68c0\u67e5\u5e76\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u56fe\u6807\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\u6309\u94ae\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u5e76\u9009\u4e2d\u201cPath\u201d\u53d8\u91cf\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002<\/li>\n<li>\u5728\u201c\u7f16\u8f91\u73af\u5883\u53d8\u91cf\u201d\u7a97\u53e3\u4e2d\uff0c\u786e\u4fdd\u5b58\u5728Python\u5b89\u88c5\u76ee\u5f55\u53ca\u5176Scripts\u5b50\u76ee\u5f55\u7684\u8def\u5f84\uff08\u4f8b\u5982C:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python39\u548cC:\\Users\\YourUsername\\AppData\\Local\\Programs\\Python\\Python39\\Scripts\uff09\u3002\u82e5\u4e0d\u5b58\u5728\uff0c\u624b\u52a8\u6dfb\u52a0\u8fd9\u4e24\u4e2a\u8def\u5f84\u3002<\/li>\n<\/ol>\n<p><p><strong>\u6dfb\u52a0\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u73af\u5883\u53d8\u91cf\u4e2d\u6ca1\u6709Python\u8def\u5f84\uff0c\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0\u3002\u70b9\u51fb\u201c\u65b0\u5efa\u201d\u6309\u94ae\uff0c\u8f93\u5165Python\u7684\u5b89\u88c5\u76ee\u5f55\u8def\u5f84\u548cScripts\u5b50\u76ee\u5f55\u8def\u5f84\uff0c\u7136\u540e\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u4fdd\u5b58\u3002\u786e\u4fdd\u8def\u5f84\u6b63\u786e\u65e0\u8bef\uff0c\u4ee5\u907f\u514d\u73af\u5883\u914d\u7f6e\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u5b89\u88c5\u5e38\u7528IDE<\/h3>\n<\/p>\n<p><p><strong>\u5b89\u88c5PyCharm<\/strong><\/p>\n<\/p>\n<p><p>PyCharm\u662fJetBrains\u516c\u53f8\u5f00\u53d1\u7684Python\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u529f\u80fd\u5f3a\u5927\uff0c\u9002\u5408\u5404\u79cd\u89c4\u6a21\u7684Python\u9879\u76ee\u5f00\u53d1\u3002\u524d\u5f80PyCharm\u5b98\u7f51\uff08<a href=\"https:\/\/www.jetbrains.com\/pycharm\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E7%A4%BE%E5%8C%BA%E7%89%88%EF%BC%88%E5%85%8D%E8%B4%B9%EF%BC%89%E6%88%96%E4%B8%93%E4%B8%9A%E7%89%88%EF%BC%88%E4%BB%98%E8%B4%B9%EF%BC%89%E3%80%82%E5%AE%89%E8%A3%85%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E6%89%93%E5%BC%80PyCharm%EF%BC%8C%E8%BF%9B%E8%A1%8C%E5%9F%BA%E7%A1%80%E8%AE%BE%E7%BD%AE%EF%BC%8C%E7%A1%AE%E4%BF%9D%E9%80%89%E6%8B%A9%E6%AD%A3%E7%A1%AE%E7%9A%84Python%E8%A7%A3%E9%87%8A%E5%99%A8%E3%80%82\">https:\/\/www.jetbrains.com\/pycharm\/\uff09\u4e0b\u8f7d\u793e\u533a\u7248\uff08\u514d\u8d39\uff09\u6216\u4e13\u4e1a\u7248\uff08\u4ed8\u8d39\uff09\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00PyCharm\uff0c\u8fdb\u884c\u57fa\u7840\u8bbe\u7f6e\uff0c\u786e\u4fdd\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u3002<\/a><\/p>\n<\/p>\n<p><p><strong>\u5b89\u88c5VS Code<\/strong><\/p>\n<\/p>\n<p><p>VS Code\u662f\u5fae\u8f6f\u5f00\u53d1\u7684\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c\u6269\u5c55\u3002\u524d\u5f80Visual Studio Code\u5b98\u7f51\uff08<a href=\"https:\/\/code.visualstudio.com\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85VS\">https:\/\/code.visualstudio.com\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5VS<\/a> Code\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00VS Code\uff0c\u5b89\u88c5Python\u6269\u5c55\uff08\u5728\u6269\u5c55\u5e02\u573a\u4e2d\u641c\u7d22Python\u5e76\u5b89\u88c5\uff09\u3002\u7136\u540e\uff0c\u914d\u7f6ePython\u89e3\u91ca\u5668\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><p><strong>\u914d\u7f6ePython\u89e3\u91ca\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728PyCharm\u6216VS Code\u4e2d\uff0c\u9700\u8981\u914d\u7f6ePython\u89e3\u91ca\u5668\u8def\u5f84\uff0c\u4ee5\u786e\u4fddIDE\u80fd\u591f\u6b63\u786e\u8bc6\u522b\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u5728PyCharm\u4e2d\uff0c\u6253\u5f00\u8bbe\u7f6e\u7a97\u53e3\uff0c\u9009\u62e9\u201cProject: &lt;\u9879\u76ee\u540d&gt;\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cPython Interpreter\u201d\uff0c\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u8def\u5f84\u3002\u5728VS Code\u4e2d\uff0c\u6309Ctrl + Shift + P\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u8f93\u5165\u201cPython: Select Interpreter\u201d\uff0c\u9009\u62e9\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5b89\u88c5pip<\/h3>\n<\/p>\n<p><p><strong>\u68c0\u67e5pip\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>Pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002\u901a\u5e38\u5728\u5b89\u88c5Python\u65f6\uff0cpip\u4f1a\u4e00\u540c\u5b89\u88c5\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u68c0\u67e5pip\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5b89\u88c5\u6216\u66f4\u65b0pip<\/strong><\/p>\n<\/p>\n<p><p>\u82e5pip\u672a\u5b89\u88c5\u6216\u9700\u8981\u66f4\u65b0\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u6216\u66f4\u65b0pip\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python -m ensurepip --upgrade<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8be5\u547d\u4ee4\u5c06\u786e\u4fdd\u7cfb\u7edf\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684pip\u3002<\/p>\n<\/p>\n<p><p><strong>\u5b89\u88c5\u5e38\u7528Python\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5\u5e38\u7528Python\u5305\u3002\u4f8b\u5982\uff0c\u5b89\u88c5NumPy\u548cPandas\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install numpy<\/p>\n<p>pip install pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e9b\u5305\u662f\u6570\u636e\u79d1\u5b66\u548c\u6570\u636e\u5206\u6790\u5e38\u7528\u7684\u57fa\u7840\u5305\uff0c\u5bf9\u4e8e\u5927\u591a\u6570Python\u9879\u76ee\u90fd\u662f\u5fc5\u9700\u7684\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u9a8c\u8bc1\u73af\u5883\u914d\u7f6e<\/h3>\n<\/p>\n<p><p><strong>\u68c0\u67e5Python\u548cpip\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1\u73af\u5883\u914d\u7f6e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python --version<\/p>\n<p>pip --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u82e5\u663e\u793aPython\u548cpip\u7684\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u73af\u5883\u914d\u7f6e\u6210\u529f\u3002<\/p>\n<\/p>\n<p><p><strong>\u8fd0\u884cPython\u811a\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff08\u4f8b\u5982test.py\uff09\uff0c\u5199\u5165\u7b80\u5355\u7684Python\u4ee3\u7801\uff08\u4f8b\u5982print(&quot;Hello, World!&quot;)\uff09\uff0c\u5e76\u8fd0\u884c\u8be5\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python test.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u8f93\u51fa\u201cHello, World!\u201d\uff0c\u5219\u8868\u660ePython\u73af\u5883\u914d\u7f6e\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u6df1\u5165\u4e86\u89e3Python\u5305\u7ba1\u7406<\/h3>\n<\/p>\n<p><p><strong>\u4f7f\u7528virtualenv\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u591a\u4e2aPython\u9879\u76ee\u65f6\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtual environment\uff09\u53ef\u4ee5\u6709\u6548\u9694\u79bb\u9879\u76ee\u4f9d\u8d56\uff0c\u907f\u514d\u5305\u7248\u672c\u51b2\u7a81\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5virtualenv\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install virtualenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u4f7f\u7528virtualenv\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">virtualenv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff08Windows\u7cfb\u7edf\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\u5305\uff0c\u786e\u4fdd\u6bcf\u4e2a\u9879\u76ee\u7684\u4f9d\u8d56\u5305\u4e92\u4e0d\u5e72\u6270\u3002<\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528requirements.txt\u7ba1\u7406\u4f9d\u8d56\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u56e2\u961f\u4e2d\uff0c\u4f7f\u7528requirements.txt\u6587\u4ef6\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56\u5305\u662f\u5e38\u89c1\u7684\u6700\u4f73\u5b9e\u8df5\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210requirements.txt\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip freeze &gt; requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5c06\u9879\u76ee\u4f9d\u8d56\u5305\u5199\u5165requirements.txt\u6587\u4ef6\u3002\u5176\u4ed6\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install -r requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u786e\u4fdd\u6240\u6709\u5f00\u53d1\u4eba\u5458\u7684\u5f00\u53d1\u73af\u5883\u4e00\u81f4\uff0c\u907f\u514d\u5305\u7248\u672c\u4e0d\u4e00\u81f4\u5bfc\u81f4\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u8c03\u8bd5\u548c\u4f18\u5316Python\u4ee3\u7801<\/h3>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u8c03\u8bd5\u5de5\u5177\u5bf9\u4e8e\u67e5\u627e\u548c\u4fee\u590d\u4ee3\u7801\u9519\u8bef\u81f3\u5173\u91cd\u8981\u3002PyCharm\u548cVS Code\u90fd\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u3001\u67e5\u770b\u53d8\u91cf\u503c\u3001\u5355\u6b65\u6267\u884c\u4ee3\u7801\u7b49\u3002<\/p>\n<\/p>\n<p><p><strong>\u6027\u80fd\u4f18\u5316<\/strong><\/p>\n<\/p>\n<p><p>Python\u4ee3\u7801\u7684\u6027\u80fd\u4f18\u5316\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u4f8b\u5982\u7b97\u6cd5\u4f18\u5316\u3001\u4f7f\u7528\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u7b49\u3002NumPy\u548cPandas\u7b49\u5e93\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u4ee3\u7801\u6027\u80fd\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u4f7f\u7528Cython\u5c06\u90e8\u5206Python\u4ee3\u7801\u7f16\u8bd1\u4e3aC\u8bed\u8a00\u4ee3\u7801\uff0c\u63d0\u9ad8\u4ee3\u7801\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u5b66\u4e60\u548c\u638c\u63e1Python\u9ad8\u7ea7\u7279\u6027<\/h3>\n<\/p>\n<p><p><strong>\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>Python\u652f\u6301\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\uff0c\u53ef\u4ee5\u5b9a\u4e49\u7c7b\u548c\u5bf9\u8c61\uff0c\u5b9e\u73b0\u7ee7\u627f\u3001\u591a\u6001\u7b49\u7279\u6027\u3002\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u6709\u52a9\u4e8e\u4ee3\u7801\u91cd\u7528\u548c\u7ef4\u62a4\uff0c\u662f\u5927\u578b\u9879\u76ee\u5f00\u53d1\u7684\u91cd\u8981\u7f16\u7a0b\u8303\u5f0f\u3002<\/p>\n<\/p>\n<p><p><strong>\u88c5\u9970\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u88c5\u9970\u5668\u662fPython\u7684\u9ad8\u7ea7\u7279\u6027\u4e4b\u4e00\uff0c\u53ef\u4ee5\u5728\u4e0d\u4fee\u6539\u51fd\u6570\u6216\u65b9\u6cd5\u5b9a\u4e49\u7684\u60c5\u51b5\u4e0b\uff0c\u52a8\u6001\u589e\u52a0\u529f\u80fd\u3002\u88c5\u9970\u5668\u5e7f\u6cdb\u7528\u4e8e\u65e5\u5fd7\u8bb0\u5f55\u3001\u6743\u9650\u9a8c\u8bc1\u7b49\u573a\u666f\uff0c\u662f\u7f16\u5199\u9ad8\u53ef\u7528\u4ee3\u7801\u7684\u91cd\u8981\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><p><strong>\u751f\u6210\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u751f\u6210\u5668\u662fPython\u7684\u53e6\u4e00\u79cd\u9ad8\u7ea7\u7279\u6027\uff0c\u53ef\u4ee5\u4f7f\u7528yield\u5173\u952e\u5b57\u5b9a\u4e49\u3002\u751f\u6210\u5668\u662f\u4e00\u79cd\u60f0\u6027\u8fed\u4ee3\u5668\uff0c\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u751f\u6210\u6570\u636e\uff0c\u907f\u514d\u4e00\u6b21\u6027\u52a0\u8f7d\u5927\u91cf\u6570\u636e\uff0c\u5360\u7528\u5185\u5b58\u3002\u751f\u6210\u5668\u5728\u5904\u7406\u5927\u6570\u636e\u65f6\u975e\u5e38\u6709\u7528\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6027\u80fd\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p><strong>\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u662fPython\u7528\u4e8e<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/58557.html\" target=\"_blank\">\u8d44\u6e90\u7ba1\u7406<\/a>\u7684\u91cd\u8981\u5de5\u5177\uff0c\u53ef\u4ee5\u4f7f\u7528with\u8bed\u53e5\u5b9e\u73b0\u3002\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u5728\u4ee3\u7801\u5757\u6267\u884c\u524d\u540e\u6267\u884c\u7279\u5b9a\u64cd\u4f5c\uff0c\u4f8b\u5982\u6253\u5f00\u548c\u5173\u95ed\u6587\u4ef6\u3001\u83b7\u53d6\u548c\u91ca\u653e\u9501\u7b49\u3002\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u6709\u52a9\u4e8e\u8d44\u6e90\u7684\u9ad8\u6548\u7ba1\u7406\u548c\u91ca\u653e\uff0c\u907f\u514d\u8d44\u6e90\u6cc4\u6f0f\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u5b66\u4e60\u548c\u5e94\u7528Python\u5e38\u7528\u5e93<\/h3>\n<\/p>\n<p><p><strong>NumPy<\/strong><\/p>\n<\/p>\n<p><p>NumPy\u662fPython\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u591a\u7ef4\u6570\u7ec4\u548c\u77e9\u9635\u8fd0\u7b97\u529f\u80fd\u3002NumPy\u662f\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7684\u57fa\u7840\u5e93\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6570\u636e\u5904\u7406\u7684\u6548\u7387\u3002<\/p>\n<\/p>\n<p><p><strong>Pandas<\/strong><\/p>\n<\/p>\n<p><p>Pandas\u662fPython\u7684\u6570\u636e\u5206\u6790\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u548c\u6570\u636e\u64cd\u4f5c\u5de5\u5177\u3002Pandas\u53ef\u4ee5\u5904\u7406\u7ed3\u6784\u5316\u6570\u636e\u548c\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u662f\u6570\u636e\u5206\u6790\u548c\u6570\u636e\u6e05\u6d17\u7684\u91cd\u8981\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><p><strong>Matplotlib<\/strong><\/p>\n<\/p>\n<p><p>Matplotlib\u662fPython\u7684\u7ed8\u56fe\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u548c\u53ef\u89c6\u5316\u6548\u679c\u3002Matplotlib\u53ef\u4ee5\u4e0eNumPy\u548cPandas\u65e0\u7f1d\u7ed3\u5408\uff0c\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u548c\u7ed3\u679c\u5c55\u793a\u3002<\/p>\n<\/p>\n<p><p><strong>Scikit-learn<\/strong><\/p>\n<\/p>\n<p><p>Scikit-learn\u662fPython\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u5404\u79cd\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u548c\u5de5\u5177\u3002Scikit-learn\u6613\u4e8e\u4f7f\u7528\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u673a\u5668\u5b66\u4e60\u4efb\u52a1\uff0c\u4f8b\u5982\u5206\u7c7b\u3001\u56de\u5f52\u3001\u805a\u7c7b\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u5341\u3001\u6301\u7eed\u5b66\u4e60\u548c\u63d0\u5347Python\u6280\u80fd<\/h3>\n<\/p>\n<p><p><strong>\u53c2\u52a0\u5728\u7ebf\u8bfe\u7a0b\u548c\u57f9\u8bad<\/strong><\/p>\n<\/p>\n<p><p>\u4e92\u8054\u7f51\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684Python\u5b66\u4e60\u8d44\u6e90\uff0c\u53ef\u4ee5\u53c2\u52a0\u5728\u7ebf\u8bfe\u7a0b\u548c\u57f9\u8bad\uff0c\u4f8b\u5982Coursera\u3001edX\u3001Udemy\u7b49\u5e73\u53f0\u63d0\u4f9b\u7684Python\u8bfe\u7a0b\u3002\u8fd9\u4e9b\u8bfe\u7a0b\u7531\u7ecf\u9a8c\u4e30\u5bcc\u7684\u8bb2\u5e08\u6388\u8bfe\uff0c\u5185\u5bb9\u6db5\u76d6\u57fa\u7840\u77e5\u8bc6\u5230\u9ad8\u7ea7\u5e94\u7528\uff0c\u9002\u5408\u4e0d\u540c\u5c42\u6b21\u7684\u5b66\u4e60\u8005\u3002<\/p>\n<\/p>\n<p><p><strong>\u9605\u8bfb\u6280\u672f\u4e66\u7c4d<\/strong><\/p>\n<\/p>\n<p><p>\u9605\u8bfb\u6280\u672f\u4e66\u7c4d\u662f\u63d0\u5347\u7f16\u7a0b\u6280\u80fd\u7684\u91cd\u8981\u9014\u5f84\u3002\u63a8\u8350\u7684Python\u4e66\u7c4d\u6709\u300aPython\u7f16\u7a0b\uff1a\u4ece\u5165\u95e8\u5230\u5b9e\u8df5\u300b\u3001\u300a\u6d41\u7545\u7684Python\u300b\u3001\u300aPython Cookbook\u300b\u7b49\u3002\u8fd9\u4e9b\u4e66\u7c4d\u5185\u5bb9\u8be6\u5b9e\uff0c\u6848\u4f8b\u4e30\u5bcc\uff0c\u53ef\u4ee5\u5e2e\u52a9\u8bfb\u8005\u6df1\u5165\u7406\u89e3Python\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<p><p><strong>\u53c2\u4e0e\u5f00\u6e90\u9879\u76ee<\/strong><\/p>\n<\/p>\n<p><p>\u53c2\u4e0e\u5f00\u6e90\u9879\u76ee\u662f\u63d0\u5347\u7f16\u7a0b\u6280\u80fd\u7684\u6700\u4f73\u65b9\u5f0f\u4e4b\u4e00\u3002\u5f00\u6e90\u9879\u76ee\u901a\u5e38\u6709\u8be6\u7ec6\u7684\u6587\u6863\u548c\u4ee3\u7801\u89c4\u8303\uff0c\u53c2\u4e0e\u5176\u4e2d\u53ef\u4ee5\u5b66\u4e60\u5230\u6700\u4f73\u7f16\u7a0b\u5b9e\u8df5\u548c\u56e2\u961f\u534f\u4f5c\u6280\u5de7\u3002\u53ef\u4ee5\u5728GitHub\u4e0a\u5bfb\u627e\u611f\u5174\u8da3\u7684Python\u5f00\u6e90\u9879\u76ee\uff0c\u5e76\u79ef\u6781\u8d21\u732e\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p><strong>\u53c2\u52a0\u6280\u672f\u793e\u533a\u548c\u4f1a\u8bae<\/strong><\/p>\n<\/p>\n<p><p>\u53c2\u52a0\u6280\u672f\u793e\u533a\u548c\u4f1a\u8bae\u662f\u4e86\u89e3\u884c\u4e1a\u52a8\u6001\u548c\u4ea4\u6d41\u7ecf\u9a8c\u7684\u91cd\u8981\u9014\u5f84\u3002\u53ef\u4ee5\u52a0\u5165Python\u76f8\u5173\u7684\u6280\u672f\u793e\u533a\uff0c\u4f8b\u5982Python\u8bba\u575b\u3001\u5fae\u4fe1\u7fa4\u3001QQ\u7fa4\u7b49\uff0c\u79ef\u6781\u53c2\u4e0e\u8ba8\u8bba\u548c\u5206\u4eab\u7ecf\u9a8c\u3002\u6b64\u5916\uff0c\u53ef\u4ee5\u53c2\u52a0Python\u5f00\u53d1\u8005\u5927\u4f1a\u3001\u6280\u672f\u5cf0\u4f1a\u7b49\uff0c\u7ed3\u8bc6\u884c\u4e1a\u4e13\u5bb6\u548c\u540c\u884c\uff0c\u62d3\u5c55\u89c6\u91ce\u548c\u4eba\u8109\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728Win10\u7cfb\u7edf\u4e2d\u987a\u5229\u914d\u7f6ePython\u73af\u5883\uff0c\u5e76\u9010\u6b65\u63d0\u5347Python\u7f16\u7a0b\u6280\u80fd\u3002\u914d\u7f6e\u597dPython\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u5f00\u59cb\u5f00\u53d1\u5404\u79cdPython\u9879\u76ee\uff0c\u63a2\u7d22Python\u7684\u5e7f\u6cdb\u5e94\u7528\u9886\u57df\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u4f60\u5728Python\u5b66\u4e60\u548c\u5f00\u53d1\u4e2d\u53d6\u5f97\u6210\u529f\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Windows 10\u4e0a\u5b89\u88c5Python\uff1f<\/strong><br \/>\u5728Windows 10\u4e0a\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\u3002\u60a8\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E4%B8%8B%E8%BD%BD%E9%80%82%E5%90%88%E6%82%A8%E7%B3%BB%E7%BB%9F%E7%9A%84%E6%9C%80%E6%96%B0%E7%89%88%E6%9C%AC%E3%80%82%E8%BF%90%E8%A1%8C%E4%B8%8B%E8%BD%BD%E7%9A%84%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%E6%97%B6%EF%BC%8C%E7%A1%AE%E4%BF%9D%E5%8B%BE%E9%80%89%E2%80%9CAdd\">https:\/\/www.python.org\/\uff09\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u7cfb\u7edf\u7684\u6700\u65b0\u7248\u672c\u3002\u8fd0\u884c\u4e0b\u8f7d\u7684\u5b89\u88c5\u7a0b\u5e8f\u65f6\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd<\/a> Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u3002<\/p>\n<p><strong>\u5728Windows 10\u4e2d\u5982\u4f55\u9a8c\u8bc1Python\u73af\u5883\u662f\u5426\u914d\u7f6e\u6210\u529f\uff1f<\/strong><br \/>\u914d\u7f6e\u6210\u529f\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08CMD\uff09\u5e76\u8f93\u5165<code>python --version<\/code>\u6216<code>python -V<\/code>\u6765\u9a8c\u8bc1\u3002\u5982\u679c\u770b\u5230Python\u7684\u7248\u672c\u4fe1\u606f\uff0c\u8bf4\u660e\u914d\u7f6e\u6210\u529f\u3002\u60a8\u8fd8\u53ef\u4ee5\u8fd0\u884c<code>pip --version<\/code>\u6765\u68c0\u67e5pip\uff08Python\u5305\u7ba1\u7406\u5668\uff09\u662f\u5426\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Windows 10\u4e2d\u5b89\u88c5\u548c\u4f7f\u7528\u865a\u62df\u73af\u5883\uff1f<\/strong><br \/>\u521b\u5efa\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7ba1\u7406\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u865a\u62df\u73af\u5883\uff1a<code>pip install virtualenv<\/code>\u3002\u4e4b\u540e\uff0c\u901a\u8fc7\u8fd0\u884c<code>virtualenv myenv<\/code>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff08<code>myenv<\/code>\u4e3a\u73af\u5883\u540d\u79f0\uff09\u3002\u8981\u6fc0\u6d3b\u5b83\uff0c\u8bf7\u4f7f\u7528<code>myenv\\Scripts\\activate<\/code>\u3002\u6fc0\u6d3b\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u8be5\u73af\u5883\u4e2d\u5b89\u88c5\u7279\u5b9a\u9879\u76ee\u6240\u9700\u7684\u5e93\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Win10\u7cfb\u7edf\u4e2d\u914d\u7f6ePython\u73af\u5883\u7684\u65b9\u6cd5\u6709\uff1a\u4e0b\u8f7d\u5b89\u88c5Python\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u5b89\u88c5\u5e38\u7528IDE\u3001\u5b89\u88c5pip [&hellip;]","protected":false},"author":3,"featured_media":1069993,"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\/1069980"}],"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=1069980"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1069980\/revisions"}],"predecessor-version":[{"id":1069995,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1069980\/revisions\/1069995"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1069993"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1069980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1069980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1069980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}