I installed virtualenv and virtualenvwrapper. However, when entering mkvirtualenv followed by the name of the environment I'm looking to create, I'm getting the following error:
@Laura-Macbook ~ % mkvirtualenv myapp
zsh: command not found: mkvirtualenv
And when I run virtualenvwrapper.sh:
@Laura-Macbook ~ % virtualenvwrapper.sh
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named virtualenvwrapper
virtualenvwrapper.sh: There was a problem running the initialization hooks.
If Python could not import the module virtualenvwrapper.hook_loader,
check that virtualenvwrapper has been installed for
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is
set properly.
My ~/.zshrc profile is as follows:
__conda_setup="$('/Users/ct/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/ct/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/ct/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/ct/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
alias python=/usr/local/bin/python3
alias pip=/usr/local/bin/pip3
# Add Homebrew's executable directory to the front of the PATH
export PATH=/Users/ct/Library/Python/3.8/bin:$PATH
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
I've tried to follow instructions on several posts but don't seem to be able to solve it! I installed python and pyenv following these instructions.