If you’ve worked with python but never used virtualenv, then you will probably have encountered this problem. You are working on 2 projects. One requires version X of a library; the other requires version Y of the same library.
So you use virtualenv to create isolated python environments so you don’t have messy and conflicting dev environments in your system.
But here’s another tool that’s a bit easier to use. It’s a wrapper for virtualenv called virtualenvwrapper.
Here’s the basics.
pip install virtualenvwrapper
Now add these 2 lines to your ~/.bash_profile (if you’re on OSX)
export WORKON_HOME=~/virtualenvs source /usr/local/bin/virtualenvwrapper.sh
(Note, the 2nd line may be different depending on where virtualenvwrapper was installed)
Create a virtual env
Exit from the virtual env
Next time you want to work on that project again
If you forgot what virtual envs you have created, you can list them