I don\'t know what\'s the deal but I am stuck following some stackoverflow solutions which gets nowhere. Can you please help me on this?
Monas-MacBook-Pro:
TLDR: pip found in your path a is a symlink and the referenced location no longer contains the executable. You need to update the symlink.
It helps to understand a couple of things.
python or pip you os will search /etc/paths to try to find the associated executable for that command. You can see everything in there by using cat /etc/paths.which, you can type which python or which pip. This will tell you the location of the executable that your shell will use for that command./etc/paths to contain /usr/local/bin, its also common for /usr/local/bin to be a bunch of symlinks to the actual executables. Not the executables themselves.bad interpreter: No such file or directory With that being said the problem is likely that pip is a symlink and the linked executable probably doesn't exist at that location anymore. To fix it do the following
which pip (gives something like this /usr/local/bin/pip)ls -l /usr/local/bin/pip | grep pip (give something like this pip -> /usr/local/opt/python@3.7/bin/pip3)ls /usr/local/opt/python@3.7/bin/pip3 (you are having this issue so it probably doesn't).rm -r /usr/local/bin/pippip executable if using homebrew it will be in /usr/local/opt you can use something like ls /usr/local/opt/ | grep python to find it.ln -s /usr/local/opt/python@3.7/bin/pip3 /usr/local/bin/pip