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
147 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
virutalenvand adds handy functionality.So concretely for your situation, you may create two environments for Python
2.7and3.3.5, and install the required libraries for eachvirtualenv. Here is a brief example of what you will have to do:Note the
-poption, which specifies the Python interpreter for that virtual environment.After creating your virtual environment, you can start working on them using the
workonutility: