{"id":1008060,"date":"2024-12-27T10:59:21","date_gmt":"2024-12-27T02:59:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1008060.html"},"modified":"2024-12-27T10:59:23","modified_gmt":"2024-12-27T02:59:23","slug":"%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85python3-8-7","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1008060.html","title":{"rendered":"\u5982\u4f55\u5b89\u88c5python3.8.7"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25083521\/949afcae-2257-4e84-a7fa-d34cfe022746.webp\" alt=\"\u5982\u4f55\u5b89\u88c5python3.8.7\" \/><\/p>\n<p><p> <strong>\u8981\u5b89\u88c5Python 3.8.7\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\uff1a\u4f7f\u7528\u5b98\u65b9\u5b89\u88c5\u5305\u3001\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\u5982Homebrew\u6216APT\u3001\u4f7f\u7528pyenv\u6765\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u3002\u63a8\u8350\u4f7f\u7528\u5b98\u65b9\u5b89\u88c5\u5305\uff0c\u56e0\u4e3a\u8fd9\u901a\u5e38\u662f\u6700\u7b80\u5355\u548c\u6700\u7a33\u5b9a\u7684\u65b9\u5f0f\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u7a0b\u5e8f\u3002\u53cc\u51fb\u5b89\u88c5\u6587\u4ef6\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u7136\u540e\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u3002\u5bf9\u4e8eMac\u7528\u6237\uff0c\u867d\u7136\u53ef\u4ee5\u4ece\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u4f46\u4f7f\u7528Homebrew\u53ef\u80fd\u66f4\u52a0\u4fbf\u6377\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>brew install python@3.8<\/code>\u5373\u53ef\u3002\u5bf9\u4e8eLinux\u7528\u6237\uff0cAPT\u7b49\u5305\u7ba1\u7406\u5de5\u5177\u662f\u9996\u9009\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>sudo apt-get update<\/code>\u548c<code>sudo apt-get install python3.8<\/code>\uff0c\u5373\u53ef\u5b89\u88c5\u3002<strong>\u9009\u62e9\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u65b9\u6cd5\u662f\u5173\u952e<\/strong>\uff0c\u786e\u4fdd\u5b89\u88c5\u8fc7\u7a0b\u7684\u987a\u5229\u8fdb\u884c\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u4e00\u3001\u4f7f\u7528\u5b98\u65b9\u5b89\u88c5\u5305<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5927\u591a\u6570\u7528\u6237\uff0c\u4f7f\u7528Python\u5b98\u65b9\u7f51\u7ad9\u63d0\u4f9b\u7684\u5b89\u88c5\u5305\u662f\u5b89\u88c5Python 3.8.7\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u6cd5\u786e\u4fdd\u5b89\u88c5\u7684\u662f\u5b98\u65b9\u7248\u672c\uff0c\u5e76\u4e14\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u53ef\u4ee5\u9009\u62e9\u6dfb\u52a0\u4e00\u4e9b\u4fbf\u6377\u9009\u9879\uff0c\u6bd4\u5982\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u548c\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E5%9C%A8%E2%80%9CDownloads%E2%80%9D%E9%A1%B5%E9%9D%A2%E4%B8%AD%E9%80%89%E6%8B%A9%E2%80%9CPython\">https:\/\/www.python.org\/\uff09\uff0c\u5728\u201cDownloads\u201d\u9875\u9762\u4e2d\u9009\u62e9\u201cPython<\/a> 3.8.7\u201d\u3002\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u5b89\u88c5\u5305\u542f\u52a8\u5b89\u88c5\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\u3002\u8fd9\u4e00\u6b65\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u5141\u8bb8\u60a8\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u8be2\u95ee\u662f\u5426\u8fdb\u884c\u81ea\u5b9a\u4e49\u5b89\u88c5\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u201cCustomize installation\u201d\u4ee5\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u548c\u5176\u4ed6\u9009\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08Mac\/Linux\uff09\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u663e\u793a\u201cPython 3.8.7\u201d\uff0c\u5219\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u90a3\u4e9b\u66f4\u719f\u6089\u547d\u4ee4\u884c\u64cd\u4f5c\u7684\u7528\u6237\uff0c\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\u6765\u5b89\u88c5Python 3.8.7\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\u3002\u8fd9\u79cd\u65b9\u6cd5\u901a\u5e38\u66f4\u5feb\u901f\uff0c\u5e76\u4e14\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u4f9d\u8d56\u5173\u7cfb\u548c\u7248\u672c\u66f4\u65b0\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Homebrew\uff08MacOS\uff09<\/strong><\/p>\n<\/p>\n<p><p>Homebrew\u662fMacOS\u4e0a\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684\u5305\u7ba1\u7406\u5de5\u5177\u3002\u4f7f\u7528Homebrew\u5b89\u88c5Python 3.8.7\u975e\u5e38\u7b80\u5355\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew update<\/p>\n<p>brew install python@3.8<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5c06Python 3.8\u7248\u672c\u7684\u8def\u5f84\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u7684Python\u7248\u672c\u3002\u4e3a\u6b64\uff0c\u60a8\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">echo &#39;export PATH=&quot;\/usr\/local\/opt\/python@3.8\/bin:$PATH&quot;&#39; &gt;&gt; ~\/.bash_profile<\/p>\n<p>source ~\/.bash_profile<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>APT\uff08Linux\uff09<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u57fa\u4e8eDebian\u7684Linux\u53d1\u884c\u7248\uff08\u5982Ubuntu\uff09\uff0cAPT\u662f\u6700\u5e38\u7528\u7684\u5305\u7ba1\u7406\u5de5\u5177\u3002\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5Python 3.8.7\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get update<\/p>\n<p>sudo apt-get install python3.8<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165<code>python3.8 --version<\/code>\u6765\u786e\u8ba4\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528pyenv\u7ba1\u7406\u7248\u672c<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u5728\u540c\u4e00\u7cfb\u7edf\u4e0a\u8fd0\u884c\u591a\u4e2aPython\u7248\u672c\u7684\u5f00\u53d1\u8005\uff0cpyenv\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\u3002\u5b83\u5141\u8bb8\u60a8\u5728\u591a\u4e2aPython\u7248\u672c\u4e4b\u95f4\u8f7b\u677e\u5207\u6362\uff0c\u5e76\u4e14\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5pyenv<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5pyenv\u3002\u5728MacOS\u4e0a\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7Homebrew\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew update<\/p>\n<p>brew install pyenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Linux\u4e0a\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u514b\u9686pyenv\u7684GitHub\u4ed3\u5e93\u6765\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">curl https:\/\/pyenv.run | bash<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u5728shell\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff08\u6839\u636e\u60a8\u7684shell\u7c7b\u578b\uff0c\u53ef\u80fd\u662f<code>~\/.bashrc<\/code>\u3001<code>~\/.bash_profile<\/code>\u6216<code>~\/.zshrc<\/code>\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">export PATH=&quot;$HOME\/.pyenv\/bin:$PATH&quot;<\/p>\n<p>eval &quot;$(pyenv init --path)&quot;<\/p>\n<p>eval &quot;$(pyenv virtualenv-init -)&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u66f4\u6539\u751f\u6548\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source ~\/.bash_profile<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528pyenv\u5b89\u88c5Python 3.8.7<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528pyenv\u5b89\u88c5Python 3.8.7\u975e\u5e38\u7b80\u5355\u3002\u53ea\u9700\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv install 3.8.7<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5c06Python 3.8.7\u8bbe\u7f6e\u4e3a\u5168\u5c40\u9ed8\u8ba4\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv global 3.8.7<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>pyenv local 3.8.7<\/code>\u547d\u4ee4\u5728\u7279\u5b9a\u9879\u76ee\u76ee\u5f55\u4e2d\u8bbe\u7f6ePython\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python 3.8.7\u65f6\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8def\u5f84\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python --version<\/code>\u65f6\u663e\u793a\u201c\u672a\u627e\u5230\u547d\u4ee4\u201d\uff0c\u53ef\u80fd\u662fPython\u6ca1\u6709\u6b63\u786e\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u62e9\u4e86\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u6216\u8005\u624b\u52a8\u5c06Python\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f9d\u8d56\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5728Linux\u4e0a\u5b89\u88c5Python\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4f9d\u8d56\u95ee\u9898\u3002\u8fd9\u901a\u5e38\u662f\u7531\u4e8e\u7f3a\u5c11\u4e00\u4e9b\u5fc5\u8981\u7684\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u5e38\u89c1\u7684\u4f9d\u8d56\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get install build-essential libssl-dev libffi-dev python3-dev<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u51b2\u7a81<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u7cfb\u7edf\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86\u5176\u4ed6\u7248\u672c\u7684Python\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7248\u672c\u51b2\u7a81\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528pyenv\u6216virtualenv\u7b49\u5de5\u5177\u6765\u7ba1\u7406\u548c\u9694\u79bb\u4e0d\u540c\u7684Python\u7248\u672c\u548c\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u9a8c\u8bc1\u5b89\u88c5\u548c\u521d\u6b65\u914d\u7f6e<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u7684\u914d\u7f6e\u548c\u9a8c\u8bc1\uff0c\u4ee5\u786e\u4fddPython 3.8.7\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9a8c\u8bc1Python\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.8 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u663e\u793a\u201cPython 3.8.7\u201d\uff0c\u5219\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5pip\u548c\u5e38\u7528\u5e93<\/strong><\/p>\n<\/p>\n<p><p>pip\u662fPython\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u901a\u5e38\u4f1a\u968fPython\u4e00\u8d77\u5b89\u88c5\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1pip\u662f\u5426\u5df2\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3.8 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5pip\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get install python3-pip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528pip\u5b89\u88c5\u5e38\u7528\u7684Python\u5e93\uff0c\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3.8 install numpy pandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u865a\u62df\u73af\u5883\u5141\u8bb8\u60a8\u4e3a\u6bcf\u4e2a\u9879\u76ee\u521b\u5efa\u72ec\u7acb\u7684Python\u73af\u5883\uff0c\u8fd9\u5bf9\u4e8e\u7ba1\u7406\u4f9d\u8d56\u5173\u7cfb\u975e\u5e38\u6709\u7528\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528<code>venv<\/code>\u6a21\u5757\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3.8 -m venv myproject_env<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff08Windows\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myproject_env\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff08Mac\/Linux\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myproject_env\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u6240\u6709\u5e93\uff0c\u800c\u4e0d\u4f1a\u5f71\u54cd\u7cfb\u7edf\u7684Python\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u68c0\u67e5\u6211\u7684\u7cfb\u7edf\u662f\u5426\u652f\u6301Python 3.8.7\u7684\u5b89\u88c5\uff1f<\/strong><br \/>\u5728\u5b89\u88c5Python 3.8.7\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u7b26\u5408\u5176\u8981\u6c42\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u5b98\u65b9\u6587\u6863\u786e\u8ba4\u652f\u6301\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u3002\u5bf9\u4e8eWindows\u7528\u6237\uff0c\u5efa\u8bae\u4f7f\u7528Windows 7\u53ca\u4ee5\u4e0a\u7248\u672c\uff0c\u800cmacOS\u7528\u6237\u5219\u9700\u898110.9\u6216\u66f4\u9ad8\u7248\u672c\u3002\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fLinux\uff0c\u901a\u5e38\u5927\u591a\u6570\u73b0\u4ee3\u53d1\u884c\u7248\u90fd\u80fd\u652f\u6301\u3002<\/p>\n<p><strong>\u5b89\u88c5Python 3.8.7\u540e\uff0c\u5982\u4f55\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u8f93\u5165<code>python3.8 --version<\/code>\u6216<code>python --version<\/code>\u6765\u786e\u8ba4\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u663e\u793a\u51fa\u7248\u672c\u53f7\u201cPython 3.8.7\u201d\uff0c\u5219\u8868\u793a\u5b89\u88c5\u987a\u5229\u3002\u6b64\u5916\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8fd0\u884cPython\u89e3\u91ca\u5668\uff0c\u8f93\u5165\u4e00\u4e9b\u57fa\u672c\u7684Python\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<p><strong>\u6211\u9700\u8981\u5b89\u88c5\u54ea\u4e9b\u989d\u5916\u7684\u5de5\u5177\u6216\u5e93\u624d\u80fd\u66f4\u597d\u5730\u4f7f\u7528Python 3.8.7\uff1f<\/strong><br \/>\u4f7f\u7528Python 3.8.7\u65f6\uff0c\u5b89\u88c5\u4e00\u4e9b\u6d41\u884c\u7684\u5e93\u548c\u5de5\u5177\u4f1a\u5927\u5927\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\u63a8\u8350\u5b89\u88c5<code>pip<\/code>\uff08Python\u5305\u7ba1\u7406\u5de5\u5177\uff09\u4ee5\u4fbf\u4e8e\u5b89\u88c5\u5176\u4ed6\u5e93\u3002\u6b64\u5916\uff0c\u5f00\u53d1\u8005\u5e38\u7528\u7684\u5e93\u6709<code>numpy<\/code>\u3001<code>pandas<\/code>\u548c<code>requests<\/code>\u7b49\uff0c\u5177\u4f53\u53ef\u4ee5\u6839\u636e\u4f60\u7684\u9879\u76ee\u9700\u6c42\u8fdb\u884c\u9009\u62e9\u3002\u6839\u636e\u4f60\u7684\u9700\u8981\uff0c\u4f7f\u7528\u547d\u4ee4<code>pip install &lt;\u5e93\u540d&gt;<\/code>\u6765\u5b89\u88c5\u6240\u9700\u7684\u5305\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5b89\u88c5Python 3.8.7\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6765\u5b9e\u73b0\uff1a\u4f7f\u7528\u5b98\u65b9\u5b89\u88c5\u5305\u3001\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\u5982Homebrew\u6216AP [&hellip;]","protected":false},"author":3,"featured_media":1008068,"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\/1008060"}],"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=1008060"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1008060\/revisions"}],"predecessor-version":[{"id":1008069,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1008060\/revisions\/1008069"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1008068"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1008060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1008060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1008060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}