Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
That's a very exhaustive answer, thank you! –  Lurco Oct 17 '13 at 22:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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