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!

link|improve this question
Did you install python 2.7 with apt-get? – Doug Harris Oct 27 '10 at 13:22
yes, I installed python 2.7 with apt-get – user31284 Oct 28 '10 at 4:19
feedback

3 Answers

up vote 0 down vote accepted

The set of currently supported python versions can be found in /usr/share/python/debian_defaults. Check whenever python-2.7 is listed there as supported.

There is a so-called python-support system in Debian. When python-support-aware package (i.e., when maintainer used python-support stuff while packaging) says that it supports specific range of Python versions, dpkg calls hooks for updates to installed runtimes as a part of postinst process. There's also alternative python-central system, which does the same thing.

link|improve this answer
feedback

Have you considered the Python setuptools? After you install it, installing additional packages is typically as easy as:

$ easy_install package-name

(depending on how you installed python 2.7, you might need to use sudo)

link|improve this answer
1  
Yes, I have setuptools working with virtualenv right now. The original question is basically a matter of curiousity now. I guess apt-get is only set up to modify the system install of python? – user31284 Oct 28 '10 at 4:20
feedback

Sounds like a problem from the repository?
You should send a bugreport to ubuntu no?
Otherwise you can install it by hand where you want :-) (but of course it's more tricky than apt-get foo)

link|improve this answer
the repository seems to be fine to me - what I was trying to do was install the updates to a different version of python. – user31284 Oct 29 '10 at 4:41
feedback

Your Answer

 
or
required, but never shown

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