2

I installed Python 2.7 from source. A dependency of some packages is python. Is there a way I can prevent the install of a lesser version of Python, or let apt know it's already been fulfilled?

2 Answers 2

2

You could get the Debian unstable source package for 2.7 and recompile it. That way you'd have a Debian-packaged Python 2.7.

If you want to keep your source installation, use the equivs package to create a fake python2.7 package to fulfil dependencies. The documentation in the package explains all you need to know (start with /usr/share/doc/equivs/README.Debian).

1
  • I think I will just get the package from sid, thanks. I'll remember about equivs for a rainy day.
    – Mike
    Jun 27, 2011 at 22:56
1

You should always avoid building Python yourself, unless you have a very good reason to. You don't want to mess with the Python environment provided by your distro. If you are just tinkering, always do it in a restricted environemnt, e.g. a VM or virtualenv. Also, why are you installing from source? Python 2.7 ought to be available from your distro, even if not by default (e.g. if you are running Debian 6, enable Testing repository to get it).

3
  • I am tinkering in a VM. Actually there was no python environment, I did a bare-bones Debian server install. And Thanks for the link to virtualenv, I haven't heard of it until now.
    – Mike
    Jun 27, 2011 at 22:54
  • Next time, please add that info to the question.
    – tshepang
    Jun 27, 2011 at 23:00
  • You needed only to do apt-get install python if you don't specifically need 2.7.
    – tshepang
    Jun 27, 2011 at 23:00

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.