Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

/usr/bin/env: 'python': No such file or directory despite installs of python 2.7 and 3.8

Writer 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.8

yet when running a tool that requires python I get:

/usr/bin/env: 'python': No such file or directory

When 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>=6

I have tried the following:

alias python=python3
alias python='/usr/bin/python3'
sudo ln -s /usr/bin/python3 /usr/bin/python

How do I solve python not being found?

2

1 Answer

One can use the following to ensure python calls are directed to python3

sudo apt-get install python-is-python3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy