New submission from Laurent Senta: Hi, on macOs Sierra (got the issue for at least 2 versions), setuptools appears to be producing commands with the wrong python env when it generates shebangs.
I use virtualenvs with python3 (brew install python3), when I pip install commands, they end up using the /Cellar/ python instead of the venv. Here's an example of a session showing the incorrect shebangs: › mkvirtualenv -p python3 bugreport Running virtualenv with interpreter /usr/local/bin/python3 Using base prefix '/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6' New python executable in /Users/laurent/.virtualenvs/bugreport/bin/python3.6 Also creating executable in /Users/laurent/.virtualenvs/bugreport/bin/python Installing setuptools, pip, wheel...done. virtualenvwrapper.user_scripts creating /Users/laurent/.virtualenvs/bugreport/bin/predeactivate virtualenvwrapper.user_scripts creating /Users/laurent/.virtualenvs/bugreport/bin/postdeactivate virtualenvwrapper.user_scripts creating /Users/laurent/.virtualenvs/bugreport/bin/preactivate virtualenvwrapper.user_scripts creating /Users/laurent/.virtualenvs/bugreport/bin/postactivate virtualenvwrapper.user_scripts creating /Users/laurent/.virtualenvs/bugreport/bin/get_env_details (bugreport) # pip is correct › which pip /Users/laurent/.virtualenvs/bugreport/bin/pip › head -n1 `which pip` #!/Users/laurent/.virtualenvs/bugreport/bin/python3.6 # pip install django pytest ipython... › which django-admin /Users/laurent/.virtualenvs/bugreport/bin/django-admin › head -n1 `which django-admin` #!/usr/local/Cellar/python3/3.6.1/bin/python3.6 › which pytest /Users/laurent/.virtualenvs/bugreport/bin/pytest › head -n1 `which pytest` #!/usr/local/Cellar/python3/3.6.1/bin/python3.6 › which ipython /Users/laurent/.virtualenvs/bugreport/bin/ipython › head -n1 `which ipython` #!/usr/local/Cellar/python3/3.6.1/bin/python3.6 ---------- messages: 787 nosy: lsenta priority: bug status: unread title: setuptools doesn't use venv on macOs _______________________________________________ Setuptools tracker <setupto...@bugs.python.org> <http://bugs.python.org/setuptools/issue165> _______________________________________________ _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig