Reputation: 1683
I'm new to python (started 2 days ago) and I have gotten to the point where I want to use matplotlib for my program. I am using python 3.3 and after I have followed the instructions of installing matplotlib I've gone through the following steps:
sudo apt-get install python-pip
sudo pip install matplotlib
That returned this 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'm still getting the same import error. I have found this page here: https://askubuntu.com/questions/427708/matplotlib-error-no-module-named-matplotlib-even-though-it-is-installed
This has given me the impression that I have installed the incorrect version of matplotlib and that 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'm currently using Ubuntu 12.04.
Thank you.
Upvotes: 10
Views: 24924
Reputation: 21
I am using python3 installed through anaconda3 on Ubuntu 16.04.
sudo <path to anaconda>/anaconda3/bin/conda install matplotlib
Path to anaconda installation directory can be found using:
conda info --envs
Upvotes: 0
Reputation: 2096
On my Mint 17 I just did, with Python 3.4 (would recommend that as you just start with Python, unless you need some library which does not yet support 3.4):
sudo pip3 install matplotlib
Then test the install:
python3
import matplotlib
matplotlib.__version__
Should give you '1.4.0'
Upvotes: 16