ImportError: No module named 'matplotlib'
<p>Brand new to Python (typically program in MSDN C#) and I'm trying to make use of the matplotlib to generate some graphics from .csv files</p>

<p>I've downloaded &amp; installed Python as well as Anaconda onto my Windows 10 machine, the versions are Python 3.5.2 and Anaconda 4.1.1</p>

<p>I open up the Python "notepad" interface and do</p>

<pre><code>import matplotlib.pyplot as plt

plt.plot([1,2,3],[3,2,1])

plt.show()
</code></pre>

<p>but when I run the code I get the error: </p>

<blockquote>
  <p>ImportError: No module named 'matplotlib'</p>
</blockquote>

<p>I've looked at some other posts for this but they all seem to be in regard to Mac OSX or Linux. Some have pointed to multiple installs of matplotlib, but I haven't turned up such a situation so far. What might be causing this, or how can I troubleshoot it?</p>

<p>**Edit:</p>

<p>The path returned to me from the import sys recommended in the comments gave me this response</p>

<blockquote>
  <p>['C:\Users\a.watts.ISAM-NA\Desktop',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\python35.zip',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\DLLs',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\lib',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\lib\site-packages',</p>
  
  <p>'C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\lib\site-packages\setuptools-26.1.1-py3.5.egg']</p>
</blockquote>

<p>You essentially have 2 versions of python on your system - the standard one you downloaded and the one that ships with Anaconda. When you are running code in the IDLE you are using the standard version (in <code>C:\Users\a.watts.ISAM-NA\AppData\Local\Programs\Python\Python35-32\python.exe</code>) where <code>matplotlib</code> isn't installed which is why you are getting the error.</p>

<p>You need to use the Anaconda version (<code>C:\Users\a.watts.ISAM-NA\AppData\Local\continuum\anaconda3\python.exe</code>) that comes with the scientific stuff already setup. It looks like your system is using this one from the <code>cmd</code> so if you run scripts from there it should use the Anaconda version. If you want to use something more interactive you can also use <code>spyder</code> - the Anaconda version of the IDLE - or run <code>jupyter notebook</code> from cmd to get a browser based platform for interactive development</p>

python matplotlib