I have installed python 2.6.6 and python 2.5.5 on the same machines (Ubuntu 10.0.4), since 2.6 is my default version and 2.5 I need for maintaining old stuff. But I have a problem to install modules(MySQLdb and net-snmp) to non-default 2.5v. It seems that only 2.6 is updated when 'sudo apt-get install _module_name_' is called. Is there a way to tell for which version module should be installed? Thanks in advance
- 1You should be using virtualenv instead of global installed. Anyway, you can override the installation directory through --install-dir and specify the site-packages of your desired python version.CastleDweller– CastleDweller2011-05-13 11:40:02 +00:00Commented May 13, 2011 at 11:40
Add a comment |
2 Answers
You can use easy_install. To use it for particular version, you just execute it like for example sudo python2.5 easy_install package_name.
3 Comments
Jakob Bowyer
pip is recommended over easy_install because of how pip plays with virtual env
vartec
@Jakob: the situation described is not
vituralenv and pip still ins't drop in replacement for easy_install. For example it cannot install from .egg.Milan Lenco
Thank you.This way I succeeded to install various modules, but I have got stuck with net-snmp-python.This package isn't listed in pypi.python.org, but it is available in repositories (apt-get install net-snmp-python) and also source codes and rpm files can be found (net-snmp.org/wiki/index.php/Python_Bindings). However using easy_install with source codes failed, since setup.py is not available. According to this: net-snmp.org/wiki/index.php/Python_Bindings package is also located in some python subdirectory, but I can't find it anywhere within Python2.5.5 source codes.