/usr/bin/env: 'python': No such file or directory despite installs of python 2.7 and 3.8
Olivia Zamora
I am running ubuntu on a the Oracle VM Virtualbox and have installed both python 3.8 and 2.7.
whereis python
python: /usr/bin/python3.8 /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.8-config /usr/lib/python3.8 /usr/lib/python2.7 /etc/python3.8 /etc/python2.7 /usr/local/lib/python3.8 /usr/local/lib/python2.7 /usr/include/python3.8yet when running a tool that requires python I get:
/usr/bin/env: 'python': No such file or directoryWhen opening the script called by the tool is is headed with and then states the following:
#! /usr/bin/env python
# Seems to work with Python 2.x, x>=6I have tried the following:
alias python=python3
alias python='/usr/bin/python3'
sudo ln -s /usr/bin/python3 /usr/bin/pythonHow do I solve python not being found?
21 Answer
One can use the following to ensure python calls are directed to python3
sudo apt-get install python-is-python3