0

I had installed Python 3.5 from anaconda distribution.

C:\Users\ananda>python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC     v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

I am importing matplotlib on jupyter notebook,where I am getting error related to module not found.

I tried to install matplotlib like below:

>>>C:\Users\ananda>conda install matplotlib
Fetching package metadata .........
Solving package specifications: ..........

# All requested packages already installed.
# packages in environment at C:\Users\ananda\AppData\Local\Continuum\Anaconda3:
matplotlib                1.5.1               np111py35_0

Not sure whats wrong I am doing,how to use matplotlib module here,do i need to install any particular version?

2
  • 3
    Did you actually try to import pylot? Because the module is called pyplot. Commented Aug 20, 2016 at 17:28
  • oops,sorry for this silly mistake.... Commented Aug 21, 2016 at 2:34

3 Answers 3

2

Your attempt to install matplotlib seems right, but the submodule you're looking for is called pyplot.

Just try:

>>> import matplotlib.pyplot as plt
>>> # No ImportError or similar, everything is fine

If you still get an error, just post the full traceback.

Hope this helps!

Sign up to request clarification or add additional context in comments.

2 Comments

>>> import matplotlib.pylot as plt Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'matplotlib.pylot' I am getting still error
oops this was pyplot,sorry for typo
0
even after having the matplotlib module if u get this error then try:

from matplotlib import pyplot

c = [1,2,3,4,5,6]

pyplot.plot(c)

pyplot.show()

to check whether the matplotlib is installed or not,**go** to your anaconda 3 folder where u have installed then go to lib then go to site packages then check for matplotlib folder if u find it then the above process works fine i.e., from matplotlib import pyplot 
if u don't find then go to anaconda prompt or command prompt then install the matplotlib using pip install matplotlib.

Comments

0

The issue is the submodule pylot instead of pyplot. its justa simple typo err anaconda should already have it installed so just run your cell again and wait while Matplotlib is building the font cache; this may take a moment.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.