virtualenv
virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need.
Check
Check
virtualenv --version
Usage
Usage
To activate a configured virtual environment (see Install below)...
cd ~/mypython
source venv/bin/activate
Run any python related commands, including pip. Any pip installs will remain local to this virtual environment.
When you are done...
deactivate
Install
Install
virtualenv
virtualenv
pip3 install virtualenv
Create a project folder for your python projects...
mkdir ~/mypython
cd ~/mypython
virtualenv -p /usr/bin/python3.6 venv
virtualenvwrapper
virtualenvwrapper
pip3 install virtualenvwrapper
export WORKON_HOME=~/mypython
source ~/mypython/venv/bin/virtualenvwrapper.sh
Usage
Usage
workon venv # Work in the venv virtual environment
deactivate # Stop working in the virtual environment
Other commands...
mkvirtualenv newvenv # Make a new virtual environment
rmvirtualenv newvenv # Remove a virtual environment