{"id":1039098,"date":"2024-12-31T12:29:41","date_gmt":"2024-12-31T04:29:41","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1039098.html"},"modified":"2024-12-31T12:29:43","modified_gmt":"2024-12-31T04:29:43","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e8%8b%b9%e6%9e%9c%e7%94%b5%e8%84%91%e4%b8%8a%e5%ae%89%e8%a3%85python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1039098.html","title":{"rendered":"\u5982\u4f55\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/9ccf87f5-4089-4fb6-8521-2bcdf374737b.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u6253\u5f00\u7ec8\u7aef\u3001\u4f7f\u7528Homebrew\u5305\u7ba1\u7406\u5668\u3001\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u3001\u9a8c\u8bc1\u5b89\u88c5\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3002<strong>\u6253\u5f00\u7ec8\u7aef\u3001\u4f7f\u7528Homebrew\u5305\u7ba1\u7406\u5668\u3001\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u3001\u9a8c\u8bc1\u5b89\u88c5\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528Homebrew\u5305\u7ba1\u7406\u5668\u662f\u4e00\u4e2a\u975e\u5e38\u4fbf\u6377\u548c\u63a8\u8350\u7684\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5b83\u7b80\u5316\u4e86\u5b89\u88c5\u548c\u7ba1\u7406Python\u7248\u672c\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u6253\u5f00\u7ec8\u7aef<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u6253\u5f00Mac\u7684\u7ec8\u7aef\u3002\u7ec8\u7aef\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u754c\u9762\uff0c\u5141\u8bb8\u7528\u6237\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u76f4\u63a5\u4ea4\u4e92\u3002\u60a8\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u6587\u4ef6\u5939\u4e2d\u7684\u201c\u5b9e\u7528\u5de5\u5177\u201d\u6587\u4ef6\u5939\u4e0b\u627e\u5230\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u6216\u8005\u901a\u8fc7\u6309\u4e0b\u201cCommand + \u7a7a\u683c\u201d\u952e\u5e76\u5728Spotlight\u641c\u7d22\u4e2d\u8f93\u5165\u201c\u7ec8\u7aef\u201d\u6765\u5feb\u901f\u6253\u5f00\u5b83\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528Homebrew\u5305\u7ba1\u7406\u5668<\/h3>\n<\/p>\n<p><p>Homebrew\u662f\u4e00\u4e2a\u975e\u5e38\u6d41\u884c\u7684macOS\u5305\u7ba1\u7406\u5668\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8f7b\u677e\u5730\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u7ba1\u7406\u5404\u79cd\u8f6f\u4ef6\u5305\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5\u4e86Homebrew\u3002\u5982\u679c\u6ca1\u6709\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5Homebrew\uff1a\n<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<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1Homebrew\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a\n<pre><code class=\"language-bash\">brew --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p>\u5982\u679c\u770b\u5230Homebrew\u7684\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/li>\n<\/p>\n<\/ol>\n<p><h3>\u4e09\u3001\u4e0b\u8f7d\u5e76\u5b89\u88c5Python<\/h3>\n<\/p>\n<p><p>\u6709\u4e86Homebrew\u540e\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5Python\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\uff1a\n<pre><code class=\"language-bash\">brew install python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1Python\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a\n<pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p>\u5982\u679c\u770b\u5230Python\u7684\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/li>\n<\/p>\n<\/ol>\n<p><h3>\u56db\u3001\u9a8c\u8bc1\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fddPython\u5b89\u88c5\u6210\u529f\u5e76\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\uff0c\u60a8\u53ef\u4ee5\u5c1d\u8bd5\u8fd0\u884c\u4e00\u4e9b\u7b80\u5355\u7684Python\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u5165Python\u89e3\u91ca\u5668\uff1a\n<pre><code class=\"language-bash\">python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5728Python\u89e3\u91ca\u5668\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u6253\u5370\u201cHello, World!\u201d\uff1a\n<pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5982\u679c\u770b\u5230\u201cHello, World!\u201d\u7684\u8f93\u51fa\uff0c\u8bf4\u660ePython\u5b89\u88c5\u6210\u529f\u5e76\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u3002<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4fbf\u4e8e\u4f7f\u7528\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5c06Python\u7684\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539<code>.bash_profile<\/code>\u6216<code>.zshrc<\/code>\u6587\u4ef6\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5728\u7ec8\u7aef\u4e2d\u6253\u5f00<code>.bash_profile<\/code>\u6216<code>.zshrc<\/code>\u6587\u4ef6\uff1a\n<pre><code class=\"language-bash\">nano ~\/.bash_profile<\/p>\n<h2><strong>\u6216\u8005<\/strong><\/h2>\n<p>nano ~\/.zshrc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a\n<pre><code class=\"language-bash\">export PATH=&quot;\/usr\/local\/opt\/python\/libexec\/bin:$PATH&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\uff0c\u7136\u540e\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u66f4\u6539\u751f\u6548\uff1a\n<pre><code class=\"language-bash\">source ~\/.bash_profile<\/p>\n<h2><strong>\u6216\u8005<\/strong><\/h2>\n<p>source ~\/.zshrc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u516d\u3001\u5b89\u88c5\u865a\u62df\u73af\u5883\u7ba1\u7406\u5de5\u5177<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7ba1\u7406\u60a8\u7684Python\u9879\u76ee\uff0c\u5efa\u8bae\u5b89\u88c5\u865a\u62df\u73af\u5883\u7ba1\u7406\u5de5\u5177\uff0c\u5982<code>virtualenv<\/code>\u6216<code>venv<\/code>\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5728\u4e0d\u540c\u9879\u76ee\u4e2d\u4f7f\u7528\u4e0d\u540c\u7248\u672c\u7684Python\u548c\u4f9d\u8d56\u5305\uff0c\u907f\u514d\u7248\u672c\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u5b89\u88c5<code>virtualenv<\/code>\uff1a\n<pre><code class=\"language-bash\">pip3 install virtualenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff1a\n<pre><code class=\"language-bash\">virtualenv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a\n<pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1a\n<pre><code class=\"language-bash\">pip install -r requirements.txt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5b8c\u6210\u5de5\u4f5c\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a\n<pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e03\u3001\u5b89\u88c5\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h3>\n<\/p>\n<p><p>\u867d\u7136\u53ef\u4ee5\u5728\u7ec8\u7aef\u4e2d\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4f46\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6d41\u884c\u7684Python IDE\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>PyCharm<\/strong>\uff1a\u4e00\u4e2a\u5f3a\u5927\u7684Python IDE\uff0c\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u3001\u6d4b\u8bd5\u7b49\u529f\u80fd\u3002<\/li>\n<li><strong>Visual Studio Code<\/strong>\uff1a\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\u548c\u6269\u5c55\u3002<\/li>\n<li><strong>Jupyter Notebook<\/strong>\uff1a\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7b14\u8bb0\u672c\uff0c\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u3002<\/li>\n<\/ol>\n<p><p>\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684IDE\uff0c\u5e76\u6309\u7167\u5176\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u5b89\u88c5\u548c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305<\/h3>\n<\/p>\n<p><p>Python\u6709\u4e00\u4e2a\u5f3a\u5927\u7684\u5305\u7ba1\u7406\u5de5\u5177<code>pip<\/code>\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5b89\u88c5\u548c\u7ba1\u7406\u5404\u79cd\u7b2c\u4e09\u65b9\u5e93\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684pip\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5\u5305\uff1a\n<pre><code class=\"language-bash\">pip install package_name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5347\u7ea7\u5305\uff1a\n<pre><code class=\"language-bash\">pip install --upgrade package_name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5378\u8f7d\u5305\uff1a\n<pre><code class=\"language-bash\">pip uninstall package_name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u5305\uff1a\n<pre><code class=\"language-bash\">pip list<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e5d\u3001\u5b66\u4e60Python\u7f16\u7a0b<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u597dPython\u540e\uff0c\u5efa\u8bae\u901a\u8fc7\u4ee5\u4e0b\u9014\u5f84\u5b66\u4e60Python\u7f16\u7a0b\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b98\u65b9\u6587\u6863<\/strong>\uff1aPython\u7684\u5b98\u65b9\u6587\u6863\u662f\u5b66\u4e60Python\u7684\u6700\u4f73\u8d44\u6e90\uff0c\u5305\u542b\u8be6\u7ec6\u7684\u8bed\u8a00\u4ecb\u7ecd\u3001\u6807\u51c6\u5e93\u53c2\u8003\u548c\u793a\u4f8b\u4ee3\u7801\u3002<\/li>\n<li><strong>\u5728\u7ebf\u8bfe\u7a0b<\/strong>\uff1aCoursera\u3001edX\u3001Udemy\u7b49\u5e73\u53f0\u4e0a\u6709\u8bb8\u591a\u9ad8\u8d28\u91cf\u7684Python\u8bfe\u7a0b\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7cfb\u7edf\u5730\u5b66\u4e60Python\u3002<\/li>\n<li><strong>\u4e66\u7c4d<\/strong>\uff1a\u4e00\u4e9b\u7ecf\u5178\u7684Python\u4e66\u7c4d\uff0c\u5982\u300aPython\u7f16\u7a0b\uff1a\u4ece\u5165\u95e8\u5230\u5b9e\u8df5\u300b\u3001\u300a\u6d41\u7545\u7684Python\u300b\u7b49\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u6df1\u5165\u7406\u89e3Python\u3002<\/li>\n<li><strong>\u793e\u533a\u548c\u8bba\u575b<\/strong>\uff1a\u52a0\u5165Python\u793e\u533a\u548c\u8bba\u575b\uff08\u5982Stack Overflow\u3001Reddit\u7684r\/learnpython\uff09\u53ef\u4ee5\u4e0e\u5176\u4ed6\u5f00\u53d1\u8005\u4ea4\u6d41\u7ecf\u9a8c\uff0c\u89e3\u51b3\u95ee\u9898\u3002<\/li>\n<\/ol>\n<p><h3>\u5341\u3001\u6301\u7eed\u66f4\u65b0\u548c\u7ef4\u62a4<\/h3>\n<\/p>\n<p><p>Python\u548c\u5176\u751f\u6001\u7cfb\u7edf\u4e0d\u65ad\u53d1\u5c55\uff0c\u4fdd\u6301\u60a8\u7684Python\u73af\u5883\u548c\u4f9d\u8d56\u5305\u7684\u6700\u65b0\u7248\u672c\u975e\u5e38\u91cd\u8981\u3002\u60a8\u53ef\u4ee5\u5b9a\u671f\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u66f4\u65b0Python\u548c\u5b89\u88c5\u7684\u5305\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u66f4\u65b0Homebrew\uff1a\n<pre><code class=\"language-bash\">brew update<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u66f4\u65b0Python\uff1a\n<pre><code class=\"language-bash\">brew upgrade python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u66f4\u65b0pip\uff1a\n<pre><code class=\"language-bash\">pip install --upgrade pip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u66f4\u65b0\u6240\u6709\u5df2\u5b89\u88c5\u7684\u5305\uff1a\n<pre><code class=\"language-bash\">pip list --outdated | cut -d &#39; &#39; -f 1 | xargs -n1 pip install -U<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u5728\u82f9\u679c\u7535\u8111\u4e0a\u6210\u529f\u5b89\u88c5\u548c\u914d\u7f6ePython\uff0c\u5f00\u59cb\u60a8\u7684Python\u7f16\u7a0b\u4e4b\u65c5\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u60a8\u5b66\u4e60\u6109\u5feb\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u8ba4\u6211\u7684\u82f9\u679c\u7535\u8111\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00\u201c\u7ec8\u7aef\u201d\u5e94\u7528\u7a0b\u5e8f\u5e76\u8f93\u5165\u547d\u4ee4<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u68c0\u67e5Python\u662f\u5426\u5df2\u5b89\u88c5\u3002\u5982\u679c\u770b\u5230\u7248\u672c\u53f7\uff0c\u8bf4\u660ePython\u5df2\u7ecf\u5b89\u88c5\u3002\u82e5\u663e\u793a\u201ccommand not found\u201d\uff0c\u5219\u9700\u8981\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p><strong>\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python\u7684\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5b89\u88c5Python\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u53cc\u51fb\u4e0b\u8f7d\u7684\u6587\u4ef6\u5e76\u6309\u7167\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3<\/code>\u786e\u8ba4\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u65b9\u6cd5\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python\uff1f<\/strong><br \/>\u9664\u4e86\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528Homebrew\uff0c\u8fd9\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u5305\u7ba1\u7406\u5de5\u5177\u3002\u901a\u8fc7\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>brew install python<\/code>\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Python\u3002\u6b64\u5916\uff0cAnaconda\u4e5f\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u62e9\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c\u673a\u5668\u5b66\u4e60\u7684\u7528\u6237\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python \u5728\u82f9\u679c\u7535\u8111\u4e0a\u5b89\u88c5Python\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u6253\u5f00\u7ec8\u7aef\u3001\u4f7f\u7528Homebrew\u5305\u7ba1\u7406 [&hellip;]","protected":false},"author":3,"featured_media":1039105,"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\/1039098"}],"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=1039098"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1039098\/revisions"}],"predecessor-version":[{"id":1039107,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1039098\/revisions\/1039107"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1039105"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1039098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1039098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1039098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}