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
🌐
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 install software-properties-common $ sudo add-apt-repository ppa:deadsnakes/ppa $ sudo apt-get update $ sudo apt-get install python3.8 · If you are using other Linux distribution, chances are you already have Python 3 pre-installed ...
🌐
Python
python.org › downloads
Download Python | Python.org
Or get the standalone installer for Python 3.14.3 · Download Python 3.14.3 · Download Python 3.14.3 · Looking for Python with a different OS? Python for Windows, Linux/Unix, macOS, Android, other · Want to help test development versions of Python 3.15? Pre-releases, Docker images ·
Discussions

Installing python on Linux - help?
You should stick with your distros version and only do a manual installation if not possible otherwise. If you really need to do it, have a look here: https://aruljohn.com/blog/install-python-debian/ More on reddit.com
🌐 r/learnpython
16
8
May 26, 2024
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
Getting started with Python development on a linux-system
There's no need to deal with all this stuff when you're just getting started. Just install Python, then create a folder where you want to keep your projects, then create a file __main__.py in the project directory and do your stuff there. You don't need virtual environments to get started with coding and stuff. You can learn about it later when you get the basics done. Use VS Code Editor. Once you get the basics done, then you may try asdf to manage multiple Python versions and use Poetry for virtual environment management. More on reddit.com
🌐 r/linuxquestions
11
0
January 23, 2024
How do I install python 2.7
You don't. Nobody ships it anymore. It's unmaintained and is a security risk. Find an alternative in Python 3 or another language. There are libraries and tools to convert to Python 3, use those. Become a better Python programmer and do it yourself. Otherwise you can install a VM of an old Linux release like Ubuntu 18.04 and try it there. Keep it off the internet and away from your personal files. More on reddit.com
🌐 r/linuxquestions
21
0
November 23, 2023
🌐
Opensource.com
opensource.com › article › 20 › 4 › install-python-linux
How to install Python on Linux | Opensource.com
Step-by-step instructions for installing the latest Python instead of (or alongside) an older version on Linux.
🌐
Kinsta®
kinsta.com › home › resource center › blog › python › how to install python on windows, macos, and linux
How To Install Python on Windows, macOS, and Linux - Kinsta®
November 17, 2025 - The Package Manager will download and install the latest version of Python 3 available in the repositories. Go to the Python website and download the newest version of Python for Linux from their website.
🌐
Python
docs.python.org › 3 › using › unix.html
2. Using Python on Unix platforms — Python 3.14.3 documentation
Getting and installing the latest version of Python: On Linux: Python comes preinstalled on most Linux distributions, and is available as a package on all others. However there are certain features...
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-python-on-linux
How to Install Python on Linux - GeeksforGeeks
July 12, 2025 - Miniconda is a lightweight version of Anaconda that includes only Conda and its dependencies, allowing you to install Python and manage packages effectively. Here’s a step-by-step guide to installing Python using Miniconda on a Linux system.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › installing python on linux - help?
r/learnpython on Reddit: Installing python on Linux - help?
May 26, 2024 -

I am a long-time user of Python but I have never understood how to install python "properly" - I tend to figure out some way to get it done when I need to, and then forget all about it. But I want to understand it a bit better because it isn't straightforward in my opinion. I am not considering Pyenv or other such "helper" tools/dependencies - I want to learn how to do this the "official" way. I've looked at the official docs but can't see what I've done incorrectly. The main issue is that at some stage I often find myself wanting a newer version of python than what is provided, and then I end up a bit stuck.

I installed Debian and it came with python3 under my /usr/local/bin directory. There is also a Python installation under /usr/bin/python3.11, which I guess is my system python? I believe I was always interacting with my /usr/local/bin python - not the system python, so that's good. (Also I'm always using virtual environments, so let's not discuss their importance please). That was working fine for me, but now I want to upgrade my version of python and I am facing difficulties.

  • What should I do to upgrade python in an "official" way (i.e. not adding dev repositories like deadsnakes, not using helper tools like Pyenv)?

  • What do I need to do with pip? Currently, the pip command actually points to /usr/bin/python - i have to use pip3* (see below).

  • Can I simply delete the old python and pip versions from /usr/local/bin if I wanted to?

  • How do I ensure that every time I type python3 in the terminal, it grabs the latest one? Do I just ensure it is higher up in my PATH variable?

  • Why is there not one simple way to do this? Obviously everyone has slightly different needs, but I imagine 80% of python users just want to use python and have a reasonable way to upgrade when required without screwing something up in their system.

To explain why I'm asking this now, I installed the python source from the main website yesterday and tried to get it working but something is off. Here's what I did

  • Extracted the Python-3.12.3.tar.xz

  • Moved into the dir and ran ./configure --enable-optimizations --with-ensurepip=install

  • Ran make

  • Ran sudo make install

This worked, but I notice when I run python in the terminal REPL that I can't use the up/down keys to cycle through my command history:

>>> print("hello")
hello
>>> ^[[A

*Also, I notice that I now have pip (/usr/bin/python), pip3, and pip3.12 now, and I am confused about that. Should I alias pip with pip3.12 to prevent interacting with the system python? Should I just delete pip3 and make sure pip3 points to pip3.12?

These issues have convinced me that I've now installed python incorrectly somehow. I found some info about readline but that's deprecated, and I am starting to go down the rabbit hole of running random commands to try and fix things, which is probably going to make things worse.

🌐
Liquid Web
liquidweb.com › home › how to install python on linux (almalinux)
How to Install Python on Linux (AlmaLinux) | Liquid Web
April 4, 2025 - With the help of this post, learn how to install Python on Linux (AlmaLinux). Python is one of the most popular programming languages for web applications.
🌐
Scaler
scaler.com › home › topics › python › how to install python on linux?
How to Install Python on Linux - Scaler Topics
May 19, 2022 - In this article, you will learn all about starting your journey with this Python tutorial by installing and interacting with Python for Linux.
🌐
Real Python
realpython.com › installing-python
How to Install Python on Your System: A Guide – Real Python
February 18, 2026 - You can install Python on Windows using the official installer from Python.org or through the Microsoft Store. On macOS, you can use the official installer or Homebrew. For Linux, use your package manager or build Python from source.
🌐
DEV Community
dev.to › motanga › how-to-install-python-on-linux-156p
How to Install Python on Linux - DEV Community
February 5, 2026 - The following command Installs pip for managing Python packages and dependencies. sudo apt install python3-pip · Verify pip Installation using the following command; pip3 --version ...
🌐
Alessioligabue
alessioligabue.it › en › blog › install-python-complete-guide
Complete Guide to Installing Python on Linux (2026)
January 29, 2026 - Complete guide to installing and upgrading Python on Linux. Learn how to manage multiple versions with pyenv, use virtual environments, and install pip
🌐
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 - Follow our step-by-step installation guide and install Python 3 on Ubuntu using APT, PPA, or from the source code.
🌐
Python.org
discuss.python.org › python help
Install python 3.11.9 on ubuntu - Python Help - Discussions on Python.org
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 ...
Published   April 16, 2024
🌐
Python Land
python.land › home › install python: detailed instructions for window, mac, and linux
Install Python: Detailed Instructions for Window, Mac, and Linux • Python Land Tutorial
October 1, 2024 - Learn how to install Python on Windows, MacOS, and Linux. We show you multiple installation options, so you can choose what suits you best.
🌐
CETS
cets.seas.upenn.edu › answers › install-python-module.html
How do I install a Python module for use on Linux systems at SEAS?
This article assumes you are logged into a CETS managed Linux machine (Eniac, a lab machine, graduate workstation, etc). Append your .bash_profile so PYTHONPATH includes ~/lib/python2.7/site-packages/ like this: echo export PYTHONPATH="$PYTHONPATH:~/lib/python2.7/site-packages/" >> ~/.bash_profile · Run this command to update the PYTHONPATH for the current session: ... Once you have configured your PYTHONPATH as described above, you can install ...
🌐
GitHub
gist.github.com › MichaelCurrin › 57caae30bd7b0991098e9804a9494c23
How to install Python 3 · GitHub
Debian/Ubuntu (for other Linux distros, see this Gist). Install using apt-get. $ sudo apt-get update $ sudo apt-get install python3 # OR python3.12