In Ubuntu 10.10, I have installed python 2.7. I would like to use apt-get to install packages to this version of python but I haven't been able to figure out how.
Things I have tried without success:
changing the symlink at /usr/bin/python to point to /usr/bin/python2.7 – even after doing this apt-get still installs stuff to python2.6.
Set up python2.7 as the primary alternative using update-alternatives – doesn't work.
Any ideas? Thanks!
Best Answer
The set of currently supported python versions can be found in
/usr/share/python/debian_defaults
. Check wheneverpython-2.7
is listed there as supported.There is a so-called
python-support
system in Debian. Whenpython-support
-aware package (i.e., when maintainer usedpython-support
stuff while packaging) says that it supports specific range of Python versions, dpkg calls hooks for updates to installed runtimes as a part ofpostinst
process. There's also alternativepython-central
system, which does the same thing.