Basics

Python Installation

Installing Python 3.12

Python installation sets up version 3.12 with pip and venv for environments.

System Requirements

Before installing Python 3.12, ensure your system meets the following requirements:

  • Operating System: Windows, macOS, or Linux
  • Processor: 1 GHz or faster
  • RAM: At least 512 MB
  • Disk Space: 100 MB of free space

Download Python 3.12

To download Python 3.12, visit the official Python website at python.org/downloads. Choose the appropriate installer for your operating system.

Installation on Windows

Follow these steps to install Python 3.12 on Windows:

  1. Run the downloaded installer.
  2. Make sure to select the option 'Add Python 3.12 to PATH'.
  3. Click 'Install Now' and follow the prompts to complete the installation.

Installation on macOS

To install Python 3.12 on macOS, open the downloaded package and follow these steps:

  1. Double-click the installer package.
  2. Follow the instructions in the installer to complete the installation.

Installation on Linux

For most Linux distributions, you can install Python 3.12 using the package manager:

sudo apt update
sudo apt install python3.12

Setting Up Virtual Environments

Python's venv module allows you to create isolated environments for your projects. This helps prevent dependency conflicts. To create a virtual environment:

Activate the virtual environment:

Once activated, you can install packages using pip without affecting the global Python installation: