I'm running Ubuntu 12.04, and I need to use matpltlib in Python 3.2.3. I successfully installed it using
sudo apt-get install python-matplotlib
But now it works only in Python 2.7, which seems to be the default version:
$ python2
Python 2.7.3 (default, Feb 27 2014, 20:00:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>>
But python 3 doesn't work:
$ python3
Python 3.2.3 (default, Feb 27 2014, 21:33:50)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named matplotlib
>>>
Also, my python command seems to be 'broken':
$ python
bash: /usr/bin/python: No such file or directory
Any help is appreciated!
In case anyone else stumbles upon this, just use
sudo apt-get install python3-matplotlib
There are many packages involved with matplotlib and using apt-get instead of pip this is the officially recommended approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With