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
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
).
-
I think I will just get the package from sid, thanks. I'll remember about equivs for a rainy day.– MikeJun 27, 2011 at 22:56
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).
-
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.– MikeJun 27, 2011 at 22:54
-
-
You needed only to do
apt-get install python
if you don't specifically need 2.7.– tshepangJun 27, 2011 at 23:00