Setting up a Python Virtual Environment
Virtual environments are primarily useful for moments when you need to reconfigure or install software but need to be mindful of the influence on other programs and settings.
- Install the virtual environment:
sudo apt-get install virtualenv
orsudo yum install python-virtualenv
- Tell your system where to store the environment:
virtualenv $HOME/myEnv
- Activate the environment:
source $HOME/myEnv/bin/activate
Use your environment as you normally would use your system.
When you are done, type exit
to close the environment.