Using two environment in Anaconda - issue with importing matplotlib
<p>I am using two environments in Anaconda (Mac OS X). When I use Python 2.7 environment I can't import matplotlib: </p>

<pre><code>%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
</code></pre>

<p>It tells me that there is no module name like that. </p>

<p>I installed matplotlib using <code>pip install matplotlib</code>.  It installed successfully but then I opened Jupyter Notebook and I tried to import it  but still it doesn't work because there is no module name like that.</p>

<p>You have to make sure matplotlib is installed in the env you've activated. If you need to use it in both envs, you need to install matplotlib into both envs. </p>

python matplotlib