This may have been asked before but I wasn't able to find any information on it. If I am running multiple versions of Python, namely Python 2.7
and Python 3.3.5
, how do I install libraries for a particular version among the two?
Installing libraries when running multiple versions of Python
113 views Asked by Jojo At
1
You would rather consider using Virtual Environments for Python. It will let you create separate and independent Python environments, for different version of Python, as well as packages.
I would also recommend this package, which just wraps
virutalenv
and adds handy functionality.So concretely for your situation, you may create two environments for Python
2.7
and3.3.5
, and install the required libraries for eachvirtualenv
. Here is a brief example of what you will have to do:Note the
-p
option, which specifies the Python interpreter for that virtual environment.After creating your virtual environment, you can start working on them using the
workon
utility: