Problem Description:
When executing some script files in the Ubuntu system, it reports:
/usr/bin/env: ‘python’: No such file or directory
The solution steps are as follows:
1. First check whether you have installed Python
python3 -- version
If it is not installed, install it first, if it is already installed, continue to execute
2. Check the installation location
whereis python3
Displayed as follows:
python3: /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python3 /usr/lib/python3.8 /usr/lib/python3.6 /usr/lib/python3 /usr/lib/python3.7 /etc/python3.6 /etc/python3 /usr/local/lib/python3.6 /usr/include/python3.6m /usr/share/python3 /usr/share/man/man1/python3.1.gz
3. Set soft link
sudo ln -s /usr/bin/python3 /usr/bin/python
Execute the script file again! ! !