2 of 20 topics completed
Installing Python on Your Computer
In this tutorial, we'll walk through the process of installing Python on your computer. We'll cover installation for Windows, macOS, and Linux operating systems.
Before You Start
Python comes in different versions. We recommend installing Python 3.x (the latest stable version) as it's the current standard and includes all modern features.
Windows
Download the installer from python.org and follow the setup wizard.
macOS
Use Homebrew or download the installer from python.org.
Linux
Most distributions come with Python pre-installed.
Installing Python on Windows
- Visit python.org/downloads
- Click "Download Python 3.x.x" (latest version)
- Run the installer
- Important: Check "Add Python to PATH" during installation
After installation, open Command Prompt and verify Python is installed:
1python --version2# Output: Python 3.x.x
Installing Python on macOS
Method 1: Using Homebrew (Recommended)
1# Install Homebrew first (if not installed)2/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"34# Install Python5brew install python3
Method 2: Using the Official Installer
- Download the macOS installer from python.org
- Open the .pkg file and follow the installation wizard
- Verify installation in Terminal:
1python3 --version2# Output: Python 3.x.x
Installing Python on Linux
Most Linux distributions come with Python pre-installed. If you need to install it manually:
Ubuntu/Debian:
1sudo apt update2sudo apt install python3 python3-pip
Fedora:
1sudo dnf install python3 python3-pip
Setting Up a Code Editor
While you can write Python code in any text editor, we recommend using an Integrated Development Environment (IDE) or code editor for a better coding experience.
Visual Studio Code
Free, lightweight, and powerful. Great for beginners and professionals alike. Download from code.visualstudio.com
PyCharm
Full-featured Python IDE. Available in free (Community) and paid (Professional) editions.
Verifying Your Installation
Let's test your Python installation by running a simple program. Open your terminal or command prompt and type:
1python32>>> print("Hello, Python!")3Hello, Python!4>>> 2 + 2546>>> exit() # To exit Python interpreter
🎯 Next Steps
Now that you have Python installed, you're ready to write your first program! Continue to the next tutorial where we'll create and run your first Python script.
Related Tutorials
Write your first Python program and understand basic syntax.
Learn moreLearn about different types of data and how to store them in Python.
Learn moreDiscover the best tools and IDEs for Python development.
Learn more