Issues running python on Linux: Difference between revisions

From KoanSoftware Wiki
Jump to navigation Jump to search
(Created page with "== Issues running python on Linux == In some cases you may have issues using '''python''' like the following /usr/bin/env: ‘python’: No such file or directory This may...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== Issues running python on Linux ==
== Issues running python on Linux ==
This article provides instructions to fix the error '''Python command not found''' in Linux.
After following the steps described in this tutorial, you will get your Python package fixed.
The content below mentions all possible causes of this problem, reported by many Linux users.


In some cases you may have issues using '''python''' like the following
In some cases you may have issues using '''python''' like the following
Line 14: Line 20:


  sudo ln -fs /usr/bin/python3 /usr/bin/python
  sudo ln -fs /usr/bin/python3 /usr/bin/python
----
A better and smarter solution is using the proper package from your distro
$ sudo apt-get install python-is-python3

Latest revision as of 09:53, 2 August 2023

Issues running python on Linux

This article provides instructions to fix the error Python command not found in Linux.

After following the steps described in this tutorial, you will get your Python package fixed.

The content below mentions all possible causes of this problem, reported by many Linux users.

In some cases you may have issues using python like the following

/usr/bin/env: ‘python’: No such file or directory

This may be a typical Python misconfiguration that ca be verified with the following commands

ls /usr/bin/python* -al
which python python2 python3

And can be solved with this command

sudo ln -fs /usr/bin/python3 /usr/bin/python




A better and smarter solution is using the proper package from your distro

$ sudo apt-get install python-is-python3