I did a mistake. I installed Python 3 and then I did the following command in order to have the defaut version Python as Python3
sudo ln -fs /opt/Python-3.4.1/python /usr/bin/python
But I wanted to come back to the python2.7 and I did
sudo ln -fs /usr/bin/python2.7/python /usr/bin/python
Now, When I want to run a bash script with python inside, I have this following error:
/usr/bin/env: bad interpreter: Not a directory
When I run this command:
ls -l /usr/bin/env
I have this result in red:
lrwxrwxrwx 1 root root 25 Jun 12 13:37 /usr/bin/env -> /usr/bin/python2.7/python
Indeed, when I go in this directory, I don't have the env executable anymore but a broken link.
I didn't find a solution on the internet.
Could you help me ? I begin to feel bad about my mistake.
Thanks
env
to actualpython
version, this program has special purpose (see related Q) – myaut/usr/bin
is an absolute no-no on basically every modern platform. – tripleee