Olivier_s_j
Olivier_s_j

Reputation: 5202

Pip installing latest version of matplotlib?

I wanted to use a functionality of matplotlib's more recent versions, and I noticed that my matplotlib is out of date. I tried upgrading it with pip, which was successful according to PIP. As can be seen in this screenshot:

enter image description here

As you can see pip says 1.4.6 is installed at /Library/Python/2.7/site-packages.

If I try the upgrade command, nothing new is installed as it says the most recent version is installed. Nevertheless, If I import matplotlib and then check the version, you can see that 1.1.1 is installed. I also add the location of the site-packages folder.

Why, according to pip is the latested version installed, but when I import it, it is not the latest version ? Also in the site package folder I find: matplotlib-1.4.2.dist-info

I work on mac osx 10.9.5

Upvotes: 1

Views: 3246

Answers (1)

tamasgal
tamasgal

Reputation: 26329

Your paths are messed up (most probably the $PYTHONPATH). Check the location of version 1.1.1 using

import matplotlib
print matplotlib.__file__

and you may see what's going on. I already saw multiple package installations in the same folder, so have a look at the files in site-packages too. Of course you should delete the older package to avoid path confusion in future ; )

Upvotes: 1

Related Questions