擅长:python、mysql、java
<h2>更新-1.5之后的自制版本</h2>
<p>根据<a href="https://brew.sh/2018/01/19/homebrew-1.5.0/" rel="noreferrer">the official Homebrew page</a>:</p>
<blockquote>
<p>On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.</p>
</blockquote>
<p>因此,要安装Python 3,请运行以下命令:</p>
<pre><code>brew install python3
</code></pre>
<p>然后,自动安装<code>pip</code>或<code>pip3</code>,您可以通过<code>pip install <package></code>安装任何包。</p>
<hr/>
<h2>老版本的自制酒</h2>
<h3>不仅<code>brew install python3</code>,而且<code>brew postinstall python3</code></h3>
<p>所以你必须跑:</p>
<pre><code>brew install python3
brew postinstall python3
</code></pre>
<p>注意,您应该检查控制台,因为它可能会给您带来错误,在这种情况下,<code>pip3</code>没有安装。</p>