Pcornel
Automation · Python Automation

pip

Cheat sheet · https://pcornel.dk/topic.php?topic=5257

Back to the Topic

Answer

pip installs Python packages from PyPI, such as pip install requests. Pin versions in requirements.txt and install inside a virtual environment rather than system-wide.

Remember

  • Install packages inside a virtual environment.
  • Pin versions in requirements.txt.
  • Use pip install -r to reproduce.

First checks

  • pip install -r requirements.txt — install pinned
  • pip list --outdated — updates
  • pip-audit — vulnerable packages

Commands

sudo pip
sudo pip install

Verify in this order

requirements → pip → venv

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5257

Confirmation

Confirm action

Continue?