/bin/sh: 1: python: not found
occurs when you have python3 installed . For example, you can check your python version:
You can see something like this. Now check if you have python3 installed or not.
It works . If it does not work for you, then install python3 in the latest version.
Follow these steps to install python3:
Step 1: Update and Refresh Repository Lists
sudo apt update
Step 2: Install Supporting Software
sudo apt install software-properties-common
Step 3: Add Deadsnakes PPA
sudo add-apt-repository ppa:deadsnakes/ppa
The system will prompt you to press enter to continue. Do so, and allow it to finish. Refresh the package lists again:
sudo apt update
Step 4: Install Python 3
Go to this page and look for the latest version of python3 : https://www.python.org/downloads/
sudo apt install python3.10.4
python3.10.4 was the latest version when I was creating the blog.
Now, check the version
python3 --version
You can read this blog for more ways to install python into Ubuntu.
Now we have python3 installed .
Still python does not work.
Let's tell our system that python3 is python.
Now, go to your VS Code and the problem will be solved.
Top comments (8)
simply use
sudo apt install python-is-python3
Valeu
Salvou muito!
It worked for me!! Thanks!!!
Now it works perfectly !
😊
It worked like a charm, Thanks!
Perfect!
sudo add-apt-repository ppa:deadsnakes/ppa
return an error
TimeoutError: [Errno 110] Connection timed out
thank you