Problems with python3 and virtualenvwrapper on Mac Big Sur

Viewed 248

I am following [these][1] instructions on setting up a macOS virtual environment. I have followed all the instructions but when I get to the last part where I have to reload the startup file by making the following call in the terminal:

source ~/.bash_profile

I get the error message:

/Applications/Xcode.app/Contents/Developer/usr/bin/python3: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: 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/python3 and that PATH is set properly.

I have tried different solutions from the internet but I am unable to get a fix.

Running which python3 and which virtualenvwrapper.sh returns:

/opt/anaconda3/bin/python3
/usr/local/bin/virtualenvwrapper.sh

My initial thoughts are that this may be due to the fact that I am running both anaconda python and regular python on the same computer. [1]: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/development_environment

0 Answers
Related