[ale] Slightly OT: System default python version

DJ-Pfulio DJPfulio at jdpfu.com
Wed Jan 24 22:08:09 EST 2018


On 01/24/2018 06: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?
> 

There are 2 major ways for python versions to be decided.

a) If you are making an application that needs to run on every OS, then
the developer should specify the exact version necessary and provide any
libs needed for it. It should be self-contained and not dependent on
whatever the OS python or OS python libraries happen to be. Ruby and
perl both provide tools for self-contained deployments in this way.
Python definitely does as well.

b) If you are making an application to be added to an existing OS, then
the platform/distro decides the version and everything you code should
work with that version and the libraries provided for it through the
package manager.

I read somewhere that Ubuntu will be switching to Python3 as the primary
platform version in 18.04. https://wiki.ubuntu.com/Python

[quote]All Ubuntu/Canonical driven development should be targeting
Python 3 right now, and all new code should be Python 3-only.
[/quote]


More information about the Ale mailing list