brew python versus non-brew ipython
<p>I installed python via brew, and made it my default python. If I run <code>which python</code>, I obtain <code>/usr/local/bin/python</code>. Also pip is installed via brew, <code>which pip</code> returns <code>/usr/local/bin/pip</code>.</p>

<p>I do not remember how I installed ipython, but I didn't do it via brew, since when I type <code>which ipython</code>, I obtain <code>/opt/local/bin/ipython</code>. Is it the OS X version of ipython?</p>

<p>I installed all libraries on this version of ipython, for example I have matplotlib on ipython but not on python. I do not want to re-install everything again on the brew python, rather continue to install libraries on this version of ipython. How can I install new libraries there? For example, Pthon Image Library, or libjpeg? </p>

<p>If possible, I would like an exhaustive answer so to understand my problem, and not just a quick fix tip.  </p>

<blockquote>
  <p>I installed <code>python</code> via <code>brew</code>, and made it my default python. If I run <code>which python</code>, I obtain <code>/usr/local/bin/python</code>. </p>
</blockquote>

<p>Okay, good so far. </p>

<blockquote>
  <p>Also <code>pip</code> is installed via <code>brew</code>, which pip returns <code>/usr/local/bin/pip</code>.</p>
</blockquote>

<p>Actually, not quite <code>brew install python</code> would have installed <code>pip</code> because even doing <code>brew search pip</code> comes up with this warning.</p>

<pre><code>If you meant "pip" precisely:

Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:
  https://pip.readthedocs.io/en/stable/installing/
</code></pre>

<p>So, Python came with pip, not <code>brew install</code></p>

<blockquote>
  <p>when I type <code>which ipython</code>, I obtain <code>/opt/local/bin/ipython</code>. Is it the OSX version of ipython?</p>
</blockquote>

<p>There is no "OSX version of ipython"... </p>

<blockquote>
  <p>I installed all libraries on this version of ipython, for example I have <code>matplotlib</code> on ipython but not on python. </p>
</blockquote>

<p>You actually did install them to your brew installed Python. IPython is not a new installation of Python. </p>

<p>You can even start a <code>python</code> interpreter from the terminal and <code>import matplotlib</code> to check this</p>

<blockquote>
  <p>I do not want to re-install everything again on the brew python</p>
</blockquote>

<p>What exactly needs re-installed? It's already installed into the brew python</p>

python osx ipython homebrew