[ale] Slightly OT: System default python version

Jeff Hubbs jhubbslist at att.net
Thu Jan 25 12:42:34 EST 2018


On 1/24/18 6:03 PM, Todor Fassl via Ale wrote:
> I got a question from a student who is using python. "I'd rather not 
> hard code in any python version. Is there any reason to have the 
> system default be 2 instead of 3?"
>
> He had asked me to install the python-matplotlib package. I was like, 
> "Are you sure you want python-matplotlib and not python3-matplotlib?" 
> He is still coding in python2.7 instead of python3 but not by choice. 
> Is there such a thing as a system default python version? To program 
> in python3, doesn't he have to modify his code?
>
In Gentoo Linux you can install a number of Python versions and have an 
overall and a default for each of Python2 and Python3. In fact, there's 
a mechanism to make the package manager go around the system and change 
which Python implementation gets invoked by apps that are already 
installed, and you can also single out or otherwise limit which Python 
version is used on a package-by-package basis.

He will not necessarily have to recode for 3.x, but if he does it's 
probably not going to be a nightmare. I've actually had slightly more 
trouble going from 3.4 to 3.6 than I have 2.7 to 3.6, just as a function 
of the specifics I've encountered (i.e., generalize my experience at 
your peril).



More information about the Ale mailing list