Python Installation
Installation guide for Python.
Setting up Python on your computer is simple and allows you to start coding quickly. Follow these steps to download and install Python.
Download and Install Python
To start using Python, you’ll need to download and install it on your computer. Here’s how to set it up.
Step 1: Download Python
Go to the official Python website to download Python:
- Visit https://www.python.org/downloads/.
- Click the Download Python button to get the latest stable version for your operating system.
Step 2: Run the Installer
Once downloaded, open the installer file.
Important: Check the box "Add Python to PATH" at the bottom of the installer window.
Choose Install Now for a quick setup, or select Customize Installation for more control.
Step 3: Verify the Installation
Open a terminal or command prompt and type the following command to confirm Python is installed:
python --version
You should see the Python version displayed.
Step 4: Check pip Installation (Optional)
Python usually comes with pip
, the package installer. To verify, type:
pip --version
If pip
isn’t available, you can install it manually with:
python -m ensurepip --upgrade
Step 5: Test Python Installation
Test Python by opening the interactive shell. Type:
python
In the Python shell, you can type print("Hello, Python!")
to make sure everything is working.
venv
Quick Setup with For an isolated environment setup, Python provides a venv
tool to create virtual environments for managing dependencies:
python3 -m venv myenv
source myenv/bin/activate # On Windows, use `myenv\Scripts\activate`