Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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).

share|improve this answer
    
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 '11 at 22:54
    
Next time, please add that info to the question. –  Tshepang Jun 27 '11 at 23:00
    
You needed only to do apt-get install python if you don't specifically need 2.7. –  Tshepang Jun 27 '11 at 23:00
add comment

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).

share|improve this answer
    
I think I will just get the package from sid, thanks. I'll remember about equivs for a rainy day. –  Mike Jun 27 '11 at 22:56
add comment

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.