[arch-general] An archlinux-python package for managing system default python version?

Chi Hsuan Yen yan12125 at gmail.com
Fri Jan 23 13:51:00 UTC 2015

Dear Arch enthusiasts,

The package extra/java-runtime-common provides a convenient script
archlinux-java to handle co-existing JDK/JRE versions. I can use it to
switch between different versions of java implementations to accomplish
numerous tasks from testing the compatibilities of my programs to running
third party applications targeting on different platforms. Now I hope
there's also a simple script for the same thing but for python. On the
system, most of the scripts are written for python2 and some other scripts
are python3-specific. In most cases it's not a problem because I can fix
the scripts or use some tricks like $PATH to ensure the correct execution
of the programs. However, in large projects, doing either is time-consuming
and costly. Recently I'm building CyanogenMod on Arch Linux. It includes
lots of python scripts in the build system, and most of them requires
python2. Using the tip provided on the article about Python on ArchWiki
prevents lots of problems, but, however, some scripts have the shebang line
"#!/usr/bin/env python" or are invoked by some command like
"/usr/bin/python ...". I have to change the link /usr/bin/python to
pointing to python2 for further progress on building and changed it back
for my daily use. If there's an archlinux-python script, lots of time on
battling the difference between python2 and python3 does not exist anymore,
which I believe lots of users can benefit from it. Any ideas?

Best Regards,

Yen Chi Hsuan

More information about the arch-general mailing list