Lots of other threads about similar issues, but none that I could find where quite the same case as mine. So, here goes:
Things I did:
- Ran:
sudo easy_install pip
- Ran:
sudo pip install virtualenv
- Ran:
sudo pip install virtualenvwrapper
Current State:
.bash_profile
export PATH=/usr/local/bin:$PATH export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache export WORKON_HOME=$HOME/.virtualenvs export PIP_VIRTUALENV_BASE=$WORKON_HOME export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
Running
mkvirtualenv test
results in:New python executable in trunk/bin/python Installing setuptools, pip...done. /usr/bin/python: No module named virtualenvwrapper
Manually inspecting '/usr/local/bin' shows that virtualenvwrapper.sh exists
- Unlike some other questions I saw about this, I get no message about virtualenvwrapper when I start a new terminal window
- Running 'which python' results in:
/usr/bin/python
What I've tried:
- Inspecting my path to make sure it looks like it is supposed to
- Reinstalling pip, then using the reinstalled pip to reinstall virtualenv and virtualenvwrapper
Any help getting this working would be very much appreciated.
Got this error after recently (summer 2017) updating Homebrew and python. The issue in my case was that Homebrew no longer overwrites the system python and I didn't have
virtualenv
andvirtualenvwrapper
installed for the system python.The solution in my case was to add the following to
~/.bash_profile
(or~/.zshrc
):export PATH="$(brew --prefix)/opt/python/libexec/bin:$PATH"
This made
python
point to the brew version of python and also gave mepip
back. This version ofpython
hadvirtualenv
andvirtualenvwrapper
installed so the error no longer appeared. See the caveats section underbrew info python
and https://github.com/Homebrew/homebrew-core/issues/15746 for more informationI've managed to get this working after having the same problem you've described here by editing my ~/.bash_profile and adding this:
Save, close.
then:
and: