I've recently installed python3 via brew (also python2 via brew) and have untouched the system python (new laptop macOS).
I then installed virtualenvwrapper with pip3 install virtualenvwrapper
Then in my shell (zsh) I've added
#set python3 as the default for new virtualenvs
$ export VIRTUALENV_PYTHON=python3
# set where virtual environments will live
export WORKON_HOME=$HOME/.virtualenvs
# set the folder for projects
export PROJECT_HOME=$HOME/PycharmProjects
# ensure all new environments are isolated from the site-packages
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
# use the same directory for virtualenvs as virtualenvwrapper
export PIP_VIRTUALENV_BASE=$WORKON_HOME
# makes pip detect an active virtualenv and install to it
export PIP_RESPECT_VIRTUALENV=true
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then
source /usr/local/bin/virtualenvwrapper.sh
else
echo "WARNING: Can't find virtualenvwrapper.sh"
fi
However whenever I run mkvirtualenv
or I get an error:
...
Installing setuptools, pip, wheel...done.
/usr/bin/python: No module named virtualenvwrapper
Even though mkvirtualenv
command seems to work as expected. However, mkproject
does not neither does the workon
command.