Matplotlib installed using Anaconda don't have pyplot

Hi All,

Sorry if I am at the wrong place. I am just learning the ropes.

I have a VM with Windows 10. There I have installed Anaconda. (Anaconda and Python are the latest versions.)
Today I installed matplotlib using Conda Install.
I didn’t have any warning / issue

The folder structures are created.
When I try to import from matplotlib, I do see suggestions. But ‘pyplot’ is not there.

I checked in the file system. I do not have any file there with this name (pyplot).
Please advice.

You found the right place!

I doesn’t look as though conda actually installed matplotlib with that command, maybe it was already installed? Can you try the following:

  1. pip install matplotlib
    • This will use the pip in that conda enivironment
  2. put import matplotlib.pyplot as plt into a python script
  3. run that script and report back what (if any errors) it gives you

I would strongly recommend “conda install matplotlib”.

And I would strongly recommend listening to @jklymak rather than me. They are a matplotlib core dev, whereas I am a random person on the internet.

Out of curiosity why is conda install preferable? I thought that wheels solved many of the issues that conda originally solved?

Maybe? I guess I don’t know enough about the wheel system.

But if you are in a conda env, why not install via conda and let it puts things where conda wants them? Sure some things are not available via conda, but…

BTW, I’ll occasionally assert expertise over some things, but definitely not in package management :wink:

Tried. But it didn’t work.


I tried using conda only. But hard luck.

You were right.
Conda was installing at : c:\programdata\Anaconda3\lib\site-packages
The application was looking at : C:\ProgramData\Anaconda3\envs\1\Lib