Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|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 –  fastmultiplication Oct 28 '10 at 4:19

3 Answers 3

up vote 1 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.

share|improve this answer

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)

share|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? –  fastmultiplication Oct 28 '10 at 4:20

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)

share|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. –  fastmultiplication Oct 29 '10 at 4:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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