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
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
New pc: how do I install python *correctly* this time?
Perfectly fine to use Windows, that's my personal preference (combined with WSL). I usually recommend using the standard Python installation, but if you're focused on doing data science Anaconda is technically a better fit. I'm going to assume you want a more generalised setup, so I'm going to explain the first one. Correct me later if you so wish. So, simply go to python.org and download the latest version, or at least 3.9 if you're not sure what you need supports 3.10 yet. When you run the installer, to make stuff easier in the beginning check the box to add Python to PATH, then just let the installer do its thing. Finally, once installed, check the box to disable the path length limit just in case - you probably won't need it, but it doesn't hurt. And that should be everything done for the basics. Virtual environments aren't a hard requirement on Windows if you ask me, but it's probably a good idea to get used to them. Personally I recommend using Poetry so that you don't have to worry about it at all yourself and because it's very modern, but you can get by without anything or by using the built-in venv if you so wish. Since Python was added to PATH, you should have direct access to running python, pip, and any tools you might install via PyPI directly. If you didn't, you'd use them via the included py-launcher. py -m pip That is all. Use whatever editor you fancy, I like VS Code with Python but you should try out different ones and find one you like yourself. More on reddit.com
🌐 r/learnpython
34
34
October 30, 2021
The absolute maze that is installing python and path variables
The official python (python.org) on Windows? The modern standard install on Windows does not use PATH at all anymore. Anyone telling you to use that is trying to make the modern install backwards compatible with the old-school way of doing things. Instead, python comes with the " python launcher ", which is the command "py". To run a file: py myfile.py To install a module: py -m pip install Etc. py is automatically associated with .py and .pyw files, so you can just doubleclick them to run as well. BUT WAIT, THERE'S A CATCH! The normal, proper way to develop python code is to make an isolated virtual environment for each project. If you do this it will activeate the old-school python and pip commands. So if you are working in a virtual environment To run a file: python myfile.py To install a module: pip install Note most good IDEs have the virtual environment management built in and often enabled by default. More on reddit.com
🌐 r/learnpython
99
208
January 28, 2022
Install python on Windows WITHOUT using the official installer?
Instead to try to find a way around this problem by installing Python in an alternative way you should tackle the actual problem. If you google the error code you'll find out quickly that you must have a serious problem with Windows itself and not with Python installer. That you can't install Python is just one symptom. If you ignore the real problem you will run into it again and again and still have no fix. But this is your decision to make. More on reddit.com
🌐 r/learnpython
18
5
August 28, 2023
🌐
Python
docs.python.org › 3 › using › windows.html
4. Using Python on Windows — Python 3.14.3 documentation
To install the file downloaded from python.org, either double-click and select “Install”, or run Add-AppxPackage <path to MSIX> in Windows Powershell. After installation, the python, py, and pymanager commands should be available.
🌐
Dataquest
dataquest.io › blog › installing-python-on-windows
How to Install Python on Windows, from Downloading to Running Scripts (2022)
March 14, 2025 - To do so, open the command line application Command Prompt (in Windows search, type cmd and press Enter) or Windows PowerShell (right-click on the Start button and select Windows PowerShell) and type there python -V. If you found that Python ...
🌐
Python Packaging
packaging.python.org › tutorials › installing-packages
Installing Packages — Python Packaging User Guide
Note that the --user flag has no effect when inside a virtual environment - all installation commands will affect the virtual environment. If SomeProject defines any command-line scripts or console entry points, --user will cause them to be installed inside the user base’s binary directory, which may or may not already be present in your shell’s PATH.
🌐
CodeRivers
coderivers.org › blog › install-python-command-line
Installing Python via the Command Line: A Comprehensive Guide - CodeRivers
April 23, 2025 - Different operating systems have their own command line interfaces, such as Command Prompt and PowerShell on Windows, Terminal on macOS, and various shells (e.g., Bash) on Linux. Installing Python via the command line offers several advantages: - Flexibility: You have more control over the installation process, allowing you to choose specific versions of Python and manage dependencies.
🌐
Pluralsight
pluralsight.com › tech insights & how-to guides › software development
How to install Python: The complete Python programmer's guide | Pluralsight
May 2, 2024 - This command installs Python 3 and Pip3. Pip3 is the Python package installer you’ll need when using Python. After installing Python, we can check to see if we installed it correctly. Close the terminal you opened and open a new one.
Find elsewhere
🌐
Python Packaging
packaging.python.org › guides › installing-stand-alone-command-line-tools
Installing stand alone command line tools — Python Packaging User Guide
ensurepath ensures that the application directory is on your $PATH. You may need to restart your terminal for this update to take effect. Now you can install packages with pipx install and run the package’s applications(s) from anywhere.
🌐
DataCamp
datacamp.com › blog › how-to-install-python
How to Install Python on Mac and Windows | DataCamp
December 4, 2024 - To install Python, follow the instructions in one of the previous sections (such as downloading and installing from the website using the Microsoft Store). To install a package using pip3, open a Terminal on macOS or Command Prompt on Windows and type the following command:
🌐
Python
docs.python.org › 3 › installing › index.html
Installing Python Modules — Python 3.14.3 documentation
At this point in time, it will often be easier for users to install these packages by other means rather than attempting to install them with pip. ... On Linux, macOS, and other POSIX systems, use the versioned Python commands in combination with the -m switch to run the appropriate copy of pip:
🌐
Real Python
realpython.com › installing-python
How to Install Python on Your System: A Guide – Real Python
February 18, 2026 - Once the installation is complete, you’ll be back at the shell prompt in your terminal window. Note: If you’re doing this on a fresh install of macOS, you may get a pop-up alert asking you to install Apple’s command line developer tools. These tools are necessary for installation, so you can confirm the dialog box by clicking Install. After the developer tools are installed, you’ll need to press Enter to continue installing Homebrew. Now that Homebrew is installed, you’re ready to install Python.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-install-python-on-linux
How to Install Python on Linux - GeeksforGeeks
July 12, 2025 - Here’s a step-by-step guide to installing Python using Miniconda on a Linux system. Open your terminal. Download the Miniconda installer for Linux. You can use wget or curl. For example: wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh · It's a good practice to verify the integrity of the installer. You can find the hash values on the Miniconda website. Use the following command to check:
🌐
Heicodersacademy
heicodersacademy.com › blog › how-to-install-python
How to Install Python on Windows, Mac and Linux
Read the latest insights and tips related to AI, python programming, data science, tech careers & more.
🌐
Dive into Python
diveintopython.org › home › learn python programming › how to install python › install python on linux
How to Install Python on Linux - A Step-by-Step Guide
May 3, 2024 - Open your terminal and type the command sudo apt-get install python to install the latest version of Python. This will download Python for linux and install it. Once the installation is complete, check your Python version using the command python ...
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › starting › install3 › linux
Installing Python 3 on Linux — The Hitchhiker's Guide to Python
Once installed, you can download, install and uninstall any compliant Python software product with a single command.
🌐
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 - If you get a “command not found,” you must install Python 3. If your output looks similar to this, you’re in luck: $ python3 --version Python 3.8.5Code language: Bash (bash) Depending on the distribution of Linux you are running, you can install Python with the default package manager: Yum, APT, etcetera.
🌐
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.

🌐
Cuni
ksvi.mff.cuni.cz › ~dingle › 2021-2 › prog_1 › installing_running.html
Installing and Running Python 3
Now click "Install Now". You'll see a message "Do you want to allow this app to make changes to your device?" Click Yes. ... Run a terminal. (On many distributions, you can do this by pressing the Super key, then typing "terminal"). In the terminal window, type "python3" at the shell prompt. Run a terminal: press Command ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › install-python-windows-10
How to Install Python on Windows | DigitalOcean
September 26, 2025 - Inside the Linux terminal, install Python using the apt package manager: sudo apt update && sudo apt upgrade sudo apt install python3 python3-pip · You now have a full Linux environment for Python development on your Windows machine. The best installation method depends on your goals.
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › python
Python on Windows for beginners | Microsoft Learn
1 month ago - This package can be installed easily, without administrator permissions, and will replace the default python and python3 commands with the real ones. Running the shortcut executable with any command-line arguments will return an error code to indicate that Python was not installed.