I am on mac (mojave osx 10.14) and admittedly I have a pretty messed up python environment.
Recently I have been getting multiple errors such as:
zsh: /usr/local/bin/pip: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
zsh: /usr/local/bin/alembic: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
zsh: /usr/local/bin/pytest: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
This is the case even with creating and entering a virtualenv to work inside of.
In this specific case, I need a python3 virtual env.
When I which python
outside the environment, I get /usr/local/bin/python
and python -v
= Python 2.7.15
Outside this virtualenv, I get these bad interpreter errors.
I create a virtualenv for python3 with virtualenv -p python3 .venv
Without even installing anything, I still get
zsh: /usr/local/bin/alembic: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
zsh: /usr/local/bin/pytest: bad interpreter: /usr/local/opt/python/bin/python3.6: no such file or directory
If I pip uninstall alembic
and pip3 uninstall alembic
, I get the bad interpreter error still.
I have no idea where it might still be installed and not sure where to start on how to clean up my environment. Would like a fresh start but I don't know if that's possible.