I'm using virtualenvwrapper. It worked fine on my previous computer, using High Sierra, but I have a new computer with Mojave.
The effect of this seems to be that when I try to install virtualenvwrapper with pip, I get:
Installing collected packages: six, stevedore, virtualenvwrapper
Found existing installation: six 1.4.1
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
I get the same thing if I try to upgrade six...
If I install with pip3, it works fine.
However, /usr/bin/python is still python2, because that seems to be a thing that no one is changing. So, whenever I try to use virtualenvwrapper, it says:
/usr/bin/python: No module named virtualenvwrapper
I have tried to delete /usr/bin/python, or make it a link to python3 or something, but I don't have permissions for that, even with sudo.
I'm not sure which part of this is the part of the knot I can unravel...
ETA: Actual output from a run:
turlingdrome$ mkvirtualenv testenv -p python3
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/brianp/work/venvs/testenv/bin/python3.7
Also creating executable in /Users/brianp/work/venvs/testenv/bin/python
Installing setuptools, pip, wheel...
done.
/usr/bin/python: No module named virtualenvwrapper
turlingdrome$ workon testenv
/usr/bin/python: No module named virtualenvwrapper
/usr/bin/python: No module named virtualenvwrapper
(testenv) turlingdrome$ python
Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
(testenv) turlingdrome$ deactivate
/usr/bin/python: No module named virtualenvwrapper
/usr/bin/python: No module named virtualenvwrapper
turlingdrome$
Did it set everything up correctly? I don't know. Normally mkvirtualenv automatically activates the env you just made...
When I set VIRTUALENVWRAPPER_PYTHON, I get:
turlingdrome$ export VIRTUALENVWRAPPER_PYTHON=python3
turlingdrome$ mkvirtualenv test2 -p python3
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/brianp/work/venvs/test2/bin/python3.7
Also creating executable in /Users/brianp/work/venvs/test2/bin/python
Installing setuptools, pip, wheel...
done.
virtualenvwrapper.user_scripts creating /Users/brianp/work/venvs/test2/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/brianp/work/venvs/test2/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/brianp/work/venvs/test2/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/brianp/work/venvs/test2/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/brianp/work/venvs/test2/bin/get_env_details
/Users/brianp/work/venvs/test2/bin/python3: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
/Users/brianp/work/venvs/test2/bin/python3: Error while finding module specification for 'virtualenvwrapper.hook_loader' (ModuleNotFoundError: No module named 'virtualenvwrapper')
(test2) turlingdrome$