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 instal开发者_StackOverflow中文版l 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
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
.
You could install Pip for both 2.5 and 2.6 then create an alias in your bashrc like I have which I can do
pip25 install _package_
or
pip26 install _package_
That way you have exact control over where a module installs.
精彩评论