How to Install Python
Python is a programming language that enables rapid development as well as more effective system integration. Python has two main different versions: Python 2 and Python 3. Both are really different.
Python develops new versions with changes periodically and releases them according to version numbers.
Python is much simpler to learn and program in any plain text editor, such as notepad or notepad++, may be used to create Python programs. To make it easier to create these routines, one may also utilise an online IDE for Python or even install one on their machine. IDEs offer a variety of tools including a user-friendly code editor, the debugger, compiler, etc. One has to have Python installed on their system in order to start creating Python code and carrying out many fascinating and helpful procedures.
Following are the given steps to download Python on your system:
Step 1: Download Python
- Visit the python website: Go to python.org/downloads.
- Download the latest version: The website will automatically recommend a link to download the latest suitable version for your operating system: windows or macOS, Linux. Click the download button.
Step 2: Install Python on Your System
For Windows
1. Run the installer: Double click on the downloaded .exe
file.
2. Check the box for “Add Python to PATH”: This is necessary for running Python from the command line.
3. Click either “Install Now” or “Customize Installation”:
- “Install Now” is quicker and installs Python with default settings.
- “Customize Installation” lets you choose optional features and installation paths.
4. Once installed, you’ll see a success message.
For macOS
- Run the installer package: By opening the
.pkg
file you downloaded. - Follow installation instructions following the normal procedures.
- After the installation, verify that it was successful by going into Terminal and typing:
python3 -- version
Note: MacOS commonly pre-installs Python 2.x. Be sure to use python3
when addressing the latest python.
For Linux
Most Linux distributions come with Python pre-installed. Check by running:
python3 --version
If it’s not installed then use your package manager to install it:
- Ubuntu/Debian:
sudo apt update
sudo apt install python3
- Fedora:
sudo dnf install python3
- Arch:
sudo pacman -S python
Step 3: Verify Installation
- Open a terminal (Command Prompt, PowerShell, or Terminal on macOS/Linux).
- Type:
python --version
or
python3 --version
You should see the installed version of Python.
Step 4: Install a Code Editor (Optional)
Install a text editor or IDE like Visual Studio Code for writing python code.
Different IDLE and Python Programming Environment
1. Atom: Atom is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows with support for plug-ins written in Node.js, and embedded Git Control, developed by GitHub. Atom is a desktop application built using web technologies.https://sourceforge.net/projects/atom.mirror/
2. PyCharm: PyCharm is an integrated development environment used in computer programming, specifically for the Python language. It is developed by the Czech company JetBrains. https://www.jetbrains.com/pycharm/
3. Visual Code Studio: Visual Studio Code is a free source-code editor made by Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. https://code.visualstudio.com
4. Spyder: Spyder is an open-source cross-platform integrated development environment for scientific programming in the Python language.https://www.spyder-ide.org
We can also use online IDEs. Online IDEs are helpful to code from remote locations on a different computer, they are also used if our computer does not have space to download software. We can also share our code online with others.