4

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!

2
  • Did you install python 2.7 with apt-get? Oct 27, 2010 at 13:22
  • yes, I installed python 2.7 with apt-get Oct 28, 2010 at 4:19

3 Answers 3

1

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.

3

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)

1
  • 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? Oct 28, 2010 at 4:20
0

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)

1
  • the repository seems to be fine to me - what I was trying to do was install the updates to a different version of python. Oct 29, 2010 at 4:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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