Install
Find the path of the version of python that you want to use
which python
Find the path of virtualenvwrapper.sh
find / -name virtualenvwrapper.sh
/home/lingxt/.local/bin/virtualenvwrapper.sh
Edit the .bashrc file
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.7
source /usr/local/bin/virtualenvwrapper.sh
export VIRTUALENVWRAPPER_ENV_BIN_DIR=bin
install virtualenv and virtualenvwrapper
sudo pip3 install virtualenv virtualenvwrapper
Use
Check the list of environment
workon
Create new environment
mkvirtualenv env_name -p path_to_python