10

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.

2 Answers 2

16

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'

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

1 Comment

2.1.0 is what I got
0

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

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.