Managing Python dependencies
- Use virtualenv tool to create isolated python environments.
- Use pip package manager to manage python packages.
Installing new packages
- With virtualenv activated use
pip install <package-name>
to install a new package. - Use
pip freeze > requirements.txt
to update project package requirements.
Updating packages
- Use
pip list --outdated | cut -d' ' -f1 | xargs pip install --upgrade && pip freeze > requirements.txt
to update all packages.