Installing Python, setting up environment
Python & VS Code Installation Guide
A comprehensive guide to setting up Python and Visual Studio Code across Windows, macOS, and Linux.
Contents
- Windows Installation
- macOS Installation
- Linux Installation (using pyenv)
- Visual Studio Code Installation
- Using Virtual ENVironments (venv)
Don’t want to be install anything? Use my made SUPY3IDE! Free, privacy focused, sandboxed, no advertisements, Python Integrated Development Environment! Just open and code, no setup needed! Just Browser and Internet needed, not else!
Windows Installation
We recommend choosing one of the following two methods to install Python on Windows:
Method 1: Using the Python Install Manager (Recommended)
- Open the Microsoft Store or use this direct store link.
- Search for Python Install Manager and click Install.
- Open the application and follow the on-screen instructions to complete the setup.
Method 2: Using the Direct Executable Installer
⚠️ Note: Standard
.exedirect installers are deprecated starting from Python 3.15. For newer versions, please use Method 1.
- Navigate to the official Python Downloads page.
- Select the latest release, or download the recommended Python 3.13 version.
- Download the Windows installer executable (
.exe). - Double-click the downloaded file to run the installer.
- Crucial: Ensure you check the box that says “Add Python to PATH” before clicking install, then follow the remaining prompts.
macOS Installation
- Download the Installer: Visit the official Python Downloads page and download the macOS installer package (
.pkg). The recommended version is 3.13. - Run the Installer: Open the downloaded
.pkgfile and follow the on-screen installation steps. You will be prompted to enter your Mac’s administrator password. - Install Certificates:
- Once complete, open your
Applicationsfolder and locate the newly createdPython 3.xdirectory. - Double-click the
Install Certificates.commandfile. This step is required to ensure Python can securely connect to the internet.
- Once complete, open your
Linux Installation (using pyenv)
For Linux distributions, we recommend using pyenv, a robust Python environment manager that functions similarly to Windows’ Install Manager.
1. Install Dependencies
Open your terminal and run the appropriate command for your package manager to install the required build dependencies:
- Ubuntu / Debian / Mint:
sudo apt update
sudo apt install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev- Fedora / RHEL / CentOS:
sudo dnf groupinstall "Development Tools"
sudo dnf install git openssl-devel bzip2-devel libffi-devel readline-devel sqlite-devel xz-devel tk-devel- Arch Linux:
sudo pacman -S --needed base-devel
sudo pacman -S git openssl zlib bzip2 readline sqlite3 libffi xz tk2. Install and Configure pyenv
- Run the automatic installer script:
curl https://pyenv.run/ | bash- Follow the instructions printed in the terminal to add pyenv to your shell profile configurations (e.g., .bashrc or .zshrc).
- Restart your terminal or source your profile to apply the changes.
3. Install Python
Install your desired version using pyenv. We recommend version 3.13:
pyenv install 3.13
pyenv global 3.13If you wanna set to specfic folder (like your project folder) to use for prevent break your some of system tools, use pyenv local 3.13 in project folder instead!
Visual Studio Code Installation
- Get your development environment ready by installing Visual Studio Code for your platform:
- Windows: Download via the Microsoft Store Link.
- macOS: Follow the official macOS Setup Guide.
- Linux: Follow the official Linux Setup Guide for .deb, .rpm, or Snap packages.
Venv installation
Setting up a Python virtual environment (venv) is a best practice to keep your project dependencies isolated.
But, you don’t needed for projects that doesn’t conflict!
- Create venv
- This is example code: Replace tags that has
<start and>end with inside sentence matching word
<Python command you use, like python3 or python> -m venv <Name your virtual environment name to what you want>
- Activate venv you created
- Windows (Command Prompt):
<Name of folder that you put in 1st step>\Scripts\activate.bat- Windows (Powershell):
<Name of folder that you put in 1st step>\Scripts\Activate.ps1- macOS/Linux:
source <Name of folder that you put in 1st step>/bin/activate- Install dependencies:
pip install <Package name>
- After all of this, to quit venv, type
deactivateto exit venv and return to normal shell