ImportError: no module names "matplotlib" Python 3.3

I am new to python (started 2 days ago) and I got to the point where I want to use matplotlib for my program. I am using python 3.3, and after I followed the matplotlib installation instructions, I followed these steps:

sudo apt-get install python-pip sudo pip install matplotlib 

This returned an import error:

 ImportError: No module named 'matplotlib' 

So, after some research, I tried this:

 sudo apt-get update sudo apt-get build-dep python-matplot 

I am still getting the same import error. I found this page here: https://askubuntu.com/questions/427708/matplotlib-error-no-module-named-matplotlib-even-though-it-is-installed

This gave the impression that I installed the wrong version of matplotlib and I need v1.2 or higher. Can someone explain to me what I need to do to be able to use matplotlib and not get this error with Python 3.3?

I am currently using Ubuntu 12.04.

Thanks.

+6
source share
1 answer

On my Mint 17, I just did with Python 3.4 (I would recommend this when you are just starting out with Python if you don't need a library that does not yet support 3.4):

 sudo pip3 install matplotlib 

Then check the installation:

 python3 import matplotlib matplotlib.__version__ 

Should give you "1.4.0"

+10
source

Source: https://habr.com/ru/post/976135/


All Articles