python - ImportError: No module named 'matplotlib' -


brand new python (typically program in msdn c#) , i'm trying make use of matplotlib generate graphics .csv files

i've downloaded & installed python anaconda onto windows 10 machine, versions python 3.5.2 , anaconda 4.1.1

i open python "notepad" interface , do

import matplotlib.pyplot plt  plt.plot([1,2,3],[3,2,1])  plt.show() 

but when run code error:

importerror: no module named 'matplotlib'

i've looked @ other posts seem in regard mac osx or linux. have pointed multiple installs of matplotlib, haven't turned such situation far. might causing this, or how can troubleshoot it?

**edit:

the path returned me import sys recommended in comments gave me response

['c:\users\a.watts.isam-na\desktop',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\python35.zip',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\dlls',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\lib',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\lib\site-packages',

'c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\lib\site-packages\setuptools-26.1.1-py3.5.egg']

you have 2 versions of python on system - standard 1 downloaded , 1 ships anaconda. when running code in idle using standard version (in c:\users\a.watts.isam-na\appdata\local\programs\python\python35-32\python.exe) matplotlib isn't installed why getting error.

you need use anaconda version (c:\users\a.watts.isam-na\appdata\local\continuum\anaconda3\python.exe) comes scientific stuff setup. looks system using 1 cmd if run scripts there should use anaconda version. if want use more interactive can use spyder - anaconda version of idle - or run jupyter notebook cmd browser based platform interactive development


Comments