Automation · Python Automation
pip
Cheat sheet · https://pcornel.dk/topic.php?topic=5257
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 pinnedpip list --outdated— updatespip-audit— vulnerable packages
Commands
sudo pipsudo 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