Python – How to install python modules for specific python version

installationpython

I needed to install UCS2 python next to UCS4 python. So I went to comp.lang.python and asked them about it. Probably not the best place to ask it, but they answered

https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/bGuAfqa76W8

and now i have brand new python 2.7.3 ucs2 installed in /opt/bin/python

What I need now is – how can I install all other python modules that I have installed for that python version also. Basically stuff like PIL and postgresql and mod_wsgi – basically everything needed to run Django for that python version.

Is this the right the place to ask for it?

Best Answer

You have to use virtualenv otherwise all installations would go to default installed python.

What virtualenv will do is install multiple python versions having separate installed modules on the system and you can choose to run any version anytime you want. It's the default way of python world to manage different versions.

Also install virtualenvwrapper which simplifies usage of virtualenv.

Related Topic