python - Change python to /usr/local/bin/python?
<p>I'm trying to install <code>opencv</code> using <code>python2.7</code>.</p>
<p>When I use <code>brew install python</code>. I got</p>
<blockquote>
<p>Warning: python-2.7.11 already installed, it's just not linked</p>
</blockquote>
<p>And then I run <code>brew link python</code> and <code>brew install python</code> again got</p>
<blockquote>
<p>1 export PATH=&quot;/usr/local/mysql/bin:$PATH&quot;</p>
<p>Warning: python-2.7.11 already installed</p>
</blockquote>
<p>But <code>which python</code> still told me I'm using <code>/usr/bin/python</code>.</p>
<p>I changed my <code>~/.bash_profile</code> to</p>
<pre><code>  1 export PATH=&quot;/usr/local/mysql/bin:$PATH&quot;
  2  #Setting PATH for Python 3.5
  3 # The orginal version is saved in .bash_profile.pysave
  4 PATH=&quot;/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}&quot;
  5 export PATH
  6 # Homebrew
  7 export PATH=&quot;/usr/local/bin:$PATH&quot;
</code></pre>
<p>No thing happens. It seems that I should be using <code>/usr/local/bin/python</code> because <code>opencv</code> is installed by <code>homebrew</code>.</p>
<p>How to solve this?</p>