{"id":944170,"date":"2024-12-26T23:01:23","date_gmt":"2024-12-26T15:01:23","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/944170.html"},"modified":"2024-12-26T23:01:25","modified_gmt":"2024-12-26T15:01:25","slug":"macpro%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bdpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/944170.html","title":{"rendered":"macpro\u5982\u4f55\u4e0b\u8f7dpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081247\/c1a56767-5f05-453a-b38d-a8ba265f1eba.webp\" alt=\"macpro\u5982\u4f55\u4e0b\u8f7dpython\" \/><\/p>\n<p><p> \u4e00\u3001\u4e0b\u8f7dPython\u7684\u57fa\u672c\u6b65\u9aa4<\/p>\n<\/p>\n<p><p><strong>\u5728Mac Pro\u4e0a\u4e0b\u8f7dPython\u5e76\u4e0d\u590d\u6742\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\u5b8c\u6210\uff1a\u9996\u5148\uff0c\u901a\u8fc7Python\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u3001\u5176\u6b21\uff0c\u901a\u8fc7Homebrew\u8fdb\u884c\u5b89\u88c5\u3001\u6700\u540e\uff0c\u901a\u8fc7Anaconda\u8fdb\u884c\u5b89\u88c5\u3002<\/strong> \u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5176\u4e2d\u4e00\u4e2a\u6b65\u9aa4\uff0c\u5373\u901a\u8fc7Python\u5b98\u65b9\u7f51\u7ad9\u8fdb\u884c\u4e0b\u8f7d\u3002\u9996\u5148\uff0c\u6253\u5f00\u4f60\u7684\u6d4f\u89c8\u5668\uff0c\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u3002\u5728\u7f51\u7ad9\u7684\u9996\u9875\uff0c\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u201cDownloads\u201d\u6309\u94ae\u3002\u70b9\u51fb\u5b83\uff0c\u7136\u540e\u9009\u62e9\u9002\u5408\u4f60Mac\u7684\u6700\u65b0Python\u7248\u672c\uff08\u901a\u5e38\u662fmacOS 64-bit installer\uff09\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\uff0c\u6839\u636e\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u8f93\u5165<code>python3 --version<\/code>\u6765\u9a8c\u8bc1Python\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u901a\u8fc7Python\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d<\/p>\n<\/p>\n<p><p>Python\u5b98\u65b9\u7f51\u7ad9\u662f\u83b7\u53d6\u6700\u65b0\u7248\u672cPython\u5b89\u88c5\u5305\u7684\u9996\u9009\u6e20\u9053\u3002\u5b83\u63d0\u4f9b\u4e86\u9002\u7528\u4e8e\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u540e\uff0c\u5bfc\u822a\u5230\u4e0b\u8f7d\u9875\u9762\uff0c\u9009\u62e9macOS\u7248\u672c\u3002\u5728\u4e0b\u8f7d\u9875\u9762\uff0c\u4f60\u4f1a\u770b\u5230\u4e0d\u540c\u7248\u672c\u7684Python\uff0c\u901a\u5e38\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u4ee5\u786e\u4fdd\u4f60\u62e5\u6709\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u66f4\u65b0\u3002<\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u4e0b\u8f7d\u7684.dmg\u6587\u4ef6\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5411\u5bfc\u5c06\u5f15\u5bfc\u4f60\u5b8c\u6210\u5b89\u88c5\u8fc7\u7a0b\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5b89\u88c5\u5411\u5bfc\u4f1a\u8ba9\u4f60\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u548c\u5176\u4ed6\u9009\u9879\uff0c\u4f46\u9ed8\u8ba4\u8bbe\u7f6e\u5df2\u8db3\u591f\u5927\u591a\u6570\u7528\u6237\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3<\/code>\u6765\u542f\u52a8Python\u89e3\u91ca\u5668\uff0c\u786e\u4fdd\u5b83\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u901a\u8fc7Homebrew\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>Homebrew\u662fmacOS\u4e0a\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5b83\u7b80\u5316\u4e86\u8f6f\u4ef6\u7684\u5b89\u88c5\u8fc7\u7a0b\u3002\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fddHomebrew\u5df2\u5b89\u88c5\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5Homebrew\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">\/bin\/bash -c &quot;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew install python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>Homebrew\u5c06\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u9879\u5e76\u4e3a\u4f60\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3<\/code>\u6765\u786e\u8ba4\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>Homebrew\u7684\u4f18\u52bf\u5728\u4e8e\u5b83\u53ef\u4ee5\u8f7b\u677e\u7ba1\u7406\u548c\u66f4\u65b0\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>brew update<\/code>\u548c<code>brew upgrade python<\/code>\u6765\u4fdd\u6301Python\u7248\u672c\u7684\u6700\u65b0\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u901a\u8fc7Anaconda\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>Anaconda\u662f\u4e00\u4e2a\u9762\u5411\u79d1\u5b66\u8ba1\u7b97\u7684Python\u53d1\u884c\u7248\uff0c\u5305\u542b\u4e86\u5927\u91cf\u7684\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u5e93\u3002\u5b83\u7279\u522b\u9002\u5408\u90a3\u4e9b\u9700\u8981\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\u7684\u7528\u6237\u3002<\/p>\n<\/p>\n<p><p>\u8981\u5b89\u88c5Anaconda\uff0c\u9996\u5148\u8bbf\u95eeAnaconda\u5b98\u65b9\u7f51\u7ad9\uff08anaconda.com\uff09\u5e76\u4e0b\u8f7d\u9002\u7528\u4e8emacOS\u7684\u5b89\u88c5\u5305\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u5b89\u88c5\u5305\u5e76\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7Anaconda Navigator\u6765\u7ba1\u7406Python\u73af\u5883\u548c\u5305\u3002Anaconda\u8fd8\u63d0\u4f9b\u4e86Conda\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7Anaconda\u5b89\u88c5Python\u7684\u597d\u5904\u662f\uff0c\u5b83\u4e3a\u4f60\u63d0\u4f9b\u4e86\u4e00\u4e2a\u9694\u79bb\u7684\u73af\u5883\uff0c\u4ee5\u907f\u514d\u5305\u4e4b\u95f4\u7684\u51b2\u7a81\uff0c\u7279\u522b\u662f\u5728\u5904\u7406\u591a\u4e2a\u9879\u76ee\u65f6\uff0c\u8fd9\u4e00\u70b9\u5c24\u4e3a\u91cd\u8981\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u8bbe\u7f6ePython\u73af\u5883\u53d8\u91cf<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5Python\u540e\uff0c\u53ef\u80fd\u9700\u8981\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u786e\u4fdd\u7cfb\u7edf\u80fd\u591f\u6b63\u786e\u627e\u5230Python\u89e3\u91ca\u5668\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u66f4\u65b0\u73af\u5883\u53d8\u91cf\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u624b\u52a8\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\uff0c\u6253\u5f00\u4f60\u7684Shell\u914d\u7f6e\u6587\u4ef6\uff08\u4f8b\u5982<code>.bash_profile<\/code>\u6216<code>.zshrc<\/code>\uff09\uff0c\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">export PATH=&quot;\/usr\/local\/bin\/python3:$PATH&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u8fd0\u884c<code>source ~\/.bash_profile<\/code>\u6216<code>source ~\/.zshrc<\/code>\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n<\/p>\n<p><p>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u4efb\u4f55\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u4f7f\u7528<code>python3<\/code>\u547d\u4ee4\u6765\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u9a8c\u8bc1Python\u5b89\u88c5<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9a8c\u8bc1Python\u662f\u5426\u6b63\u786e\u5b89\u88c5\u975e\u5e38\u91cd\u8981\u3002\u6253\u5f00\u7ec8\u7aef\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u663e\u793a\u4f60\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5982\u679c\u663e\u793a\u7684\u7248\u672c\u53f7\u4e0e\u4f60\u5b89\u88c5\u7684\u7248\u672c\u4e00\u81f4\uff0c\u5219\u8bf4\u660ePython\u5df2\u6b63\u786e\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u542f\u52a8Python\u89e3\u91ca\u5668\u5e76\u8fd0\u884c\u7b80\u5355\u7684Python\u547d\u4ee4\u6765\u8fdb\u4e00\u6b65\u9a8c\u8bc1\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3<\/p>\n<p>&gt;&gt;&gt; print(&quot;Hello, Python!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u8f93\u51fa\u201cHello, Python!\u201d\u5219\u8bf4\u660ePython\u5de5\u4f5c\u6b63\u5e38\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5b89\u88c5Python\u5305\u7ba1\u7406\u5de5\u5177<\/p>\n<\/p>\n<p><p>Python\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5305\u62ecpip\u548cConda\u3002pip\u901a\u5e38\u968fPython\u4e00\u8d77\u5b89\u88c5\uff0c\u800cConda\u5219\u662fAnaconda\u7684\u4e00\u90e8\u5206\u3002<\/p>\n<\/p>\n<p><p>\u8981\u786e\u4fddpip\u5df2\u5b89\u88c5\u5e76\u53ef\u7528\uff0c\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679cpip\u672a\u5b89\u88c5\u6216\u9700\u8981\u66f4\u65b0\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\u6216\u66f4\u65b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m ensurepip --upgrade<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7pip\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip3 install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516b\u3001\u4f7f\u7528Python\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u591a\u4e2aPython\u9879\u76ee\u65f6\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u4f60\u9694\u79bb\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\u3002Python\u81ea\u5e26\u7684<code>venv<\/code>\u6a21\u5757\u53ef\u4ee5\u65b9\u4fbf\u5730\u521b\u5efa\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\uff0c\u5bfc\u822a\u5230\u4f60\u7684\u9879\u76ee\u76ee\u5f55\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>myenv<\/code>\u7684\u865a\u62df\u73af\u5883\u3002\u8981\u6fc0\u6d3b\u8be5\u73af\u5883\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u540e\uff0c\u6240\u6709\u5728\u8be5\u73af\u5883\u4e2d\u7684Python\u5305\u5b89\u88c5\u5c06\u4ec5\u5f71\u54cd\u8be5\u73af\u5883\u3002\u8981\u9000\u51fa\u865a\u62df\u73af\u5883\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e5d\u3001\u66f4\u65b0\u548c\u5378\u8f7dPython<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fdd\u4f60\u4f7f\u7528\u7684Python\u7248\u672c\u59cb\u7ec8\u662f\u6700\u65b0\u7684\uff0c\u4f60\u53ef\u4ee5\u5b9a\u671f\u68c0\u67e5\u66f4\u65b0\u3002\u5982\u679c\u4f60\u662f\u901a\u8fc7Homebrew\u5b89\u88c5\u7684Python\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u66f4\u65b0\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew update<\/p>\n<p>brew upgrade python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u5378\u8f7dPython\uff0c\u53ef\u4ee5\u6839\u636e\u5b89\u88c5\u65b9\u5f0f\u9009\u62e9\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u901a\u8fc7Homebrew\u5b89\u88c5\u7684Python\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5378\u8f7d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew uninstall python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u662f\u901a\u8fc7\u5b98\u65b9\u7f51\u7ad9\u5b89\u88c5\u7684Python\uff0c\u4f60\u9700\u8981\u624b\u52a8\u5220\u9664\u5b89\u88c5\u76ee\u5f55\uff0c\u5e76\u6e05\u7406\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><p>\u5341\u3001\u89e3\u51b3\u5e38\u89c1\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u548c\u4f7f\u7528Python\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4f8b\u5982\uff0cPython\u7248\u672c\u51b2\u7a81\u6216\u5e93\u7684\u4f9d\u8d56\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7248\u672c\u51b2\u7a81<\/strong>\uff1a\u786e\u4fdd\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528<code>python3<\/code>\u800c\u4e0d\u662f<code>python<\/code>\uff0c\u4ee5\u907f\u514d\u8c03\u7528\u7cfb\u7edf\u81ea\u5e26\u7684\u65e7\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5e93\u4f9d\u8d56\u95ee\u9898<\/strong>\uff1a\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u4f60\u9694\u79bb\u9879\u76ee\u7684\u4f9d\u8d56\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u9519\u8bef<\/strong>\uff1a\u786e\u4fdd\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650\u8fdb\u884c\u5b89\u88c5\uff0c\u7279\u522b\u662f\u5728\u5b89\u88c5\u8def\u5f84\u9700\u8981\u5199\u6743\u9650\u65f6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u89e3\u51b3\u65b9\u6848\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u5728Mac Pro\u4e0a\u987a\u5229\u5b89\u88c5\u548c\u4f7f\u7528Python\u3002Python\u7684\u5f3a\u5927\u529f\u80fd\u548c\u5e7f\u6cdb\u7684\u5e94\u7528\u8303\u56f4\uff0c\u4f7f\u5f97\u5b83\u6210\u4e3a\u4e86\u8bb8\u591a\u5f00\u53d1\u8005\u548c\u6570\u636e\u79d1\u5b66\u5bb6\u7684\u9996\u9009\u5de5\u5177\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Mac Pro\u4e0a\u786e\u8ba4\u662f\u5426\u5df2\u5b89\u88c5Python\uff1f<\/strong><br \/>\u5728Mac Pro\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u68c0\u67e5Python\u662f\u5426\u5df2\u5b89\u88c5\u3002\u6253\u5f00\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u5e76\u6309\u56de\u8f66\u3002\u5982\u679c\u7cfb\u7edf\u8fd4\u56de\u4e86\u7248\u672c\u53f7\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002\u5982\u679c\u6ca1\u6709\u8fd4\u56de\u7248\u672c\u53f7\uff0c\u5219\u9700\u8981\u4e0b\u8f7d\u548c\u5b89\u88c5Python\u3002<\/p>\n<p><strong>\u5728Mac Pro\u4e0a\u4e0b\u8f7dPython\u7684\u6700\u4f73\u6765\u6e90\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5efa\u8bae\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\u8fdb\u884c\u4e0b\u8f7d\u3002\u5b98\u65b9\u7f51\u7ad9\u63d0\u4f9b\u4e86\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u652f\u6301macOS\u7cfb\u7edf\uff0c\u5e76\u5305\u542b\u8be6\u7ec6\u7684\u5b89\u88c5\u8bf4\u660e\u3002\u6b64\u5916\uff0c\u4f7f\u7528Homebrew\u8fd9\u6837\u7684\u5305\u7ba1\u7406\u5668\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u5b83\u53ef\u4ee5\u7b80\u5316\u5b89\u88c5\u8fc7\u7a0b\u5e76\u7ba1\u7406Python\u7684\u7248\u672c\u3002<\/p>\n<p><strong>Mac Pro\u5b89\u88c5Python\u540e\u9700\u8981\u914d\u7f6e\u4ec0\u4e48\u5417\uff1f<\/strong><br \/>\u5b89\u88c5Python\u540e\uff0c\u53ef\u80fd\u9700\u8981\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u4ee5\u4fbf\u5728\u7ec8\u7aef\u4e2d\u65b9\u4fbf\u4f7f\u7528\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cPython\u7684\u5b89\u88c5\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u914d\u7f6e\u8fd9\u4e9b\u8bbe\u7f6e\uff0c\u4f46\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fHomebrew\uff0c\u53ef\u80fd\u9700\u8981\u624b\u52a8\u6dfb\u52a0Python\u8def\u5f84\u5230\u4f60\u7684<code>~\/.bash_profile<\/code>\u6216<code>~\/.zshrc<\/code>\u6587\u4ef6\u4e2d\u3002\u786e\u4fdd\u5c06\u914d\u7f6e\u4fdd\u5b58\u5e76\u91cd\u65b0\u52a0\u8f7d\u7ec8\u7aef\uff0c\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e00\u3001\u4e0b\u8f7dPython\u7684\u57fa\u672c\u6b65\u9aa4 \u5728Mac Pro\u4e0a\u4e0b\u8f7dPython\u5e76\u4e0d\u590d\u6742\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\u5b8c\u6210\uff1a\u9996\u5148\uff0c\u901a [&hellip;]","protected":false},"author":3,"featured_media":944173,"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\/944170"}],"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=944170"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944170\/revisions"}],"predecessor-version":[{"id":944174,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/944170\/revisions\/944174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/944173"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=944170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=944170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=944170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}