Python is installed to all of our computers because it is useful framework for a variety of things .

To use the python interface from terminal just type python .

to check you python version just type python --version

to run a python script you need to type in the form :

./python_script_name.py

but very importantly it has to be executable first

chmod +x python_script_name.py

I hope it helps !

Answer from billybadass on askubuntu.com
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install python 3 on ubuntu
How to Install Python 3 on Ubuntu | phoenixNAP KB
June 12, 2025 - In this tutorial, you will learn how to install Python 3 on Ubuntu. ... A system running Ubuntu (this tutorial uses Ubuntu 22.04 or Ubuntu 24.04). A user account with sudo or root privileges. Access to the terminal.
Discussions

Install python 3.11.9 on ubuntu
According to this page: 'Python 3.11.9 is the newest major release of the Python programming language". Can I install Python 3.11.9 in my Virtual Machine? I have installed guest VM ubuntu-22.04.4-desktop-amd64.iso on a Windows 10 host. In the VM, I have run the following: sudo apt install sudo ... More on discuss.python.org
🌐 discuss.python.org
0
1
April 16, 2024
How do I install python?
Chances are it's already installed. In terminal you can type python3 --version and it will tell you if it is installed already. More on reddit.com
🌐 r/Ubuntu
11
4
February 25, 2021
How to download and use python on ubuntu? - Stack Overflow
by Default python install in ubuntu so you check version by typing in terminal(Ctrl+Alt+T) python3 -V if show older version then configure it type in terminal More on stackoverflow.com
🌐 stackoverflow.com
How can I install Python 3.9 on a Linux Ubuntu terminal? - Stack Overflow
I tried apt install python 3.9 and it replied: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3.9 E: Couldn't find any pa... More on stackoverflow.com
🌐 stackoverflow.com
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install3 › linux
Installing Python 3 on Linux — The Hitchhiker's Guide to Python
$ sudo apt-get update $ sudo apt-get install python3.6 · If you’re using another version of Ubuntu (e.g.
🌐
Python.org
discuss.python.org › python help
Install python 3.11.9 on ubuntu - Python Help - Discussions on Python.org
In the VM, I have run the following: sudo apt install sudo apt upgrade this: python3 --version returns: Python 3.10.12 When I run: sudo apt install python3 I receive this message: python3 is already at the newest version (3.10.6-1~22.04) When...
Published   April 16, 2024
🌐
Reddit
reddit.com › r/ubuntu › how do i install python?
r/Ubuntu on Reddit: How do I install python?
February 25, 2021 -

Hey Reddit. I'm super new to ubuntu. (like 3 days ago I got my first machine running it.) and need some quick help. I want to install python so I can run code on the machine and I have no idea how to do that. I'm guessing it'll be something like "sudo install python3.9". thanks for the help!

🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › how-to-install-python-in-ubuntu
How to install Python in Ubuntu (3 Methods to install ) - GeeksforGeeks
July 23, 2025 - Now, directly paste the following command in the Terminal & execute it. It will directly download the latest Python File. ... Replace [version number] with the Python version you want to be installed in your Ubuntu system.
🌐
Beebom
beebom.com › how-install-python-ubuntu-linux
How to Install Python in Ubuntu Linux (4 Methods) | Beebom
October 15, 2025 - But bear in mind, it’s a slightly ... specs. Here are the steps you need to follow. 1. First, open the Terminal and run the below command to update the packages....
Find elsewhere
🌐
MakeUseOf
makeuseof.com › home › linux › how to install python in ubuntu [3.12]
How to Install Python in Ubuntu [3.12]
June 30, 2023 - Here's how to do it: Open up your terminal by pressing Ctrl + Alt + T. Update your system's repository list by entering the following command: ... APT will automatically find the package and install it on your computer.
🌐
Linux Hint
linuxhint.com › install-python-ubuntu-22-04
How to Install Python on Ubuntu 22.04? – Linux Hint
After that, run the following command to install the Ubuntu-Desktop package to have the GUI and the CLI support on your Ubuntu 22.04: ... Log in to the system and run the following command to verify the availability of the default Python3:
Top answer
1 of 3
84

If you are on Ubuntu 19.10 (Eoan Ermine) (or any other version unsupported by the deadsnakes PPA), you will not be able to install using the deadsnakes PPA.

What you can do instead, is get the source from Python's official website, and install it manually, as described here.

To do so, first, install the dependencies required to build the Python package.

sudo apt install build-essential zlib1g-dev \
libncurses5-dev libgdbm-dev libnss3-dev \
libssl-dev libreadline-dev libffi-dev curl software-properties-common

Then download the tarball and extract it:

wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
tar -xf Python-3.9.0.tar.xz

Then cd to the extracted directory:

cd Python-3.9.0

Now configure the script:

./configure

Now, to install Python 3.9 alongside your current Python installation (if any), use:

sudo make altinstall

Lastly, you can verify your installation using

python3.9 --version

How to make python3.X default of Python 3? (Optional)

rm /usr/bin/python3
ln -s /usr/bin/python3.5 /usr/bin/python3
  • create an alias in ~/.bash_aliases, ~/.zshrc, etc.
alias python3='/usr/bin/python3.9'

or

alias python3='/usr/local/bin/python3.9'
2 of 3
41

You are getting that error because you first need to update the package list and the prerequisites.

sudo apt update
sudo apt install software-properties-common

Then, add the repository ppa:deadsnakes/ppa to your sources list (where you will download Python from)

sudo add-apt-repository ppa:deadsnakes/ppa

Make sure to press Enter when prompted. Then update available the packages:

sudo apt update

Lastly, install the version of your choice:

sudo apt install python3.9

Make sure to read this:

Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk.

PPA Deadsnake

🌐
BlueVPS
bluevps.com › blog › how to install python on ubuntu 22.04? (a complete step-by-step guide)
How to Install Python on Ubuntu 22.04
To install Python3 on Ubuntu using the deadsnakes PPA repository, follow the below steps: Open a terminal and run the following command to update your package lists:
🌐
UbuntuHandbook
ubuntuhandbook.org › home › howtos › how to install python 3.12 (final) in ubuntu 22.04 | 20.04
How to Install Python 3.12 (Final) in Ubuntu 22.04 | 20.04 | UbuntuHandbook
1. First download the source tarball from its ftp download page: ... 2. Then open ‘Downloads’ folder, extract the source tarball, finally right-click on source folder and select “Open in Terminal”. 3. When terminal opens, run the commands below one by one to configure and build Python: ...
🌐
ComputingForGeeks
computingforgeeks.com › home › how to install python 3.10 on ubuntu 22.04|20.04|18.04
How To Install Python 3.10 on Ubuntu 22.04|20.04|18.04 [Guide]
September 27, 2024 - Step-by-step guide to install Python 3.10 on Ubuntu 22.04|20.04|18.04. Includes commands, verification, and troubleshooting.
🌐
Ubuntu
documentation.ubuntu.com › ubuntu-for-developers › howto › python-setup
How to set up a development environment for Python on Ubuntu - Ubuntu for Developers
19 hours ago - This guide outlines how to install the Python interpreter and developer tooling on Ubuntu. Python is an ubiquitous, object-oriented scripting language with an extensive ecosystem. Installing Python...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-20-04-server
How To Install Python 3 and Set Up a Programming Environment on an Ubuntu 20.04 Server | DigitalOcean
April 4, 2022 - If you’re not already familiar ... useful for becoming better oriented with the terminal. With your server and user set up, you are ready to begin. Ubuntu 20.04 and other versions of Debian Linux ship with Python 3 pre-installed....
🌐
Medium
medium.com › @pythonistaSage › installing-and-using-python-on-ubuntu-a-guided-tutorial-c4ab0eda33a3
Installing and Using Python on Ubuntu: A Guided Tutorial | by PythonistaSage | Medium
March 25, 2023 - Pip is a package manager for Python that allows you to easily install and manage Python packages. To install pip on Ubuntu, open the terminal and type the following command:
🌐
UltaHost
ultahost.com › knowledge-base › install-python-ubuntu
How to Install Python on Ubuntu | Ultahost Knowledge Base
April 13, 2025 - You can find the latest version by downloading the compressed file for Ubuntu. After downloading place the folder in the directory and access them from the terminal. ... After building the essentials, Use the APT command to install Python.
🌐
Opensource.com
opensource.com › article › 20 › 4 › install-python-linux
How to install Python on Linux | Opensource.com
April 13, 2020 - Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with: ... The configuration may take some time. Wait until it is successfully finishes before proceeding. If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command:
🌐
Linuxize
linuxize.com › home › python › how to install python 3.9 on ubuntu 20.04
How to Install Python 3.9 on Ubuntu 20.04 | Linuxize
November 15, 2020 - Update the packages list and install the prerequisites: Terminal · sudo apt update sudo apt install software-properties-common · Add the deadsnakes PPA to your system’s sources list: Terminal ·