I have Ubuntu 12.04 and I'm learning via Python 2.7.3 (specifically Pylab - IPython, NumPy, SciPy and Matplotlib). I thought it's better to learn the newest version of Python. Using apt-get tells me that all of the above are the most recent versions. The reasons are explained here: Changing Python default in 12.04 LTS

So I apt-get python3 and ipython3, but how to have the latest Pylab set for my Python3 interpreter?

1 Answer 1


Ubuntu/Debian treats python and python3, and their associated libraries as different packages (rather than one being an upgraded version of the other), since there are fairly few libraries which have a common codebase executable in both python 2 and 3.

Thus, you want python3-numpy, python3-scipy, python3-matplotlib, etc. Unfortunately, python3-matplotlib is not available in 12.04 (it is available from 13.04). You might be able to find a PPA containing it, but I personally don't know one to recommend.

(Other libraries you might want to consider for a scientific python setup might include sympy, pandas, and the various scikit packages).

Edit: Learning python 3 rather than 2 is a sensible goal, but if you're restricted to 12.04 you're likely to find support lacking in a number of libraries. That being the case, the best course is probably to use python 2 while ensuring you write forward-compatible code - see the official porting guide for suggestions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.