Python
π Python 3.11 + venv + pip Setup (macOS, Linux & Windows)
Diese Anleitung zeigt dir, wie du lokal eine isolierte Entwicklungsumgebung aufsetzt β fΓΌr einheitliches Linting, Testing und Packaging.
π§° 1. Voraussetzungen
- Du brauchst Python 3.11
- Zugriff auf das Terminal (macOS/Linux) oder PowerShell (Windows)
π macOS
β Python 3.11 installieren
brew install python@3.11
Falls nΓΆtig, verlinken:
brew link python@3.11 --force
π Virtuelle Umgebung einrichten
python3.11 -m venv .venv
source .venv/bin/activate
π¦ pip & tools aktualisieren
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
π§ Linux (Ubuntu/Debian)
β Python 3.11 installieren
sudo apt update
sudo apt install python3.11 python3.11-venv python3.11-dev
π Virtuelle Umgebung einrichten
python3.11 -m venv .venv
source .venv/bin/activate
π¦ pip & tools aktualisieren
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
πͺ Windows
β Python 3.11 installieren
- Lade Python 3.11 von python.org
- Beim Installieren: βAdd Python to PATHβ aktivieren
- Installiere mit allen optionalen Features (inkl.
pip
)
π Virtuelle Umgebung einrichten
python -m venv .venv
.\.venv\Scripts\activate
π¦ pip & tools aktualisieren
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt