Or download the installer from python.org.
macOS
# Via Homebrew (recommended)
brew install python@3.12
# Verify
python3 --version
Or download the installer from python.org.
Windows
- Download from python.org/downloads
- During installation: make sure to check “Add Python to PATH”
- Verify:
python --version
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install python3 python3-pip python3-venv
python3 --version
pyenv — version management
# Install pyenv (macOS/Linux)
curl https://pyenv.run | bash
# Install a specific version
pyenv install 3.12.0
pyenv global 3.12.0 # globally
pyenv local 3.11.0 # for the current directory
python --version # 3.11.0
Verifying the installation
python3 --version # Python 3.12.0
python3 -m pip --version
python3 -c "print('Hello, Python!')"
IDLE — the built-in IDE
python3 -m idlelib
A simple editor and interactive console to get started.
Recommended setup
Python 3.11+ (LTS)
+ VS Code with the Python extension
+ venv virtual environment
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!