Pakete mit pip installieren
pip
pip ist der Paketmanager für Python.
python -m pip install matplotlib
python -m pip install flask
python -m pip nutzt sicher das pip der aktuellen Python-Installation.
Nützliche Befehle
python -m pip list
python -m pip show flask
python -m pip uninstall flask
Rate mal!
venv aktiv, dann install – wohin geht das Paket?
Auflösung
In die venv, nicht ins System (wenn alles korrekt aktiviert ist).
Probiere es selbst
Experiment 1
pip list anschauen.
Experiment 2
Ein kleines Paket installieren (z. B. requests oder später matplotlib).
Experiment 3
pip show lesen.
Fehlerdetektiv
pip: command not found → python -m pip nutzen oder venv prüfen.
Übungen
Level 1
Install-Befehl schreiben.
Level 2
list und show erklären.
Level 3
Warum -m pip oft besser ist.
Level-1-Lösung
python -m pip install flask
Mini-Quiz
pip sitzt! Als Nächstes: requirements.txt.