pipenv
and poetry
pip
and virtualenv
are standard tools
- but situation is changing
- many different tools and projects
- overview of current situation
- future is uncertain
Python Packaging Authority (pypa)
- working group that maintains many of the relevant projects in Python packaging
Installation
Development
- dependency management
- project isolation
- new projects
- NOTE: as of May, 2022: neither
pipenv
or poetry
are standard tools for Python community
Anaconda
- https://www.anaconda.com/
- have their own Python distribution
- have their own package management
- have their own distribution system
- have tool called
conda
- does everything
pip
and virtualenv
do
- installer
- virtual environment tool
- and much more
- can install non-Python packages too
- mostly aimed at Data Science community
- NOTE: as of May, 2022: Anaconda isn't really part of standard Python ecosystem
Requirements
requirements.txt
- standard (
pip
)
- non-deterministic dependency resolution
Pipfile
pipenv
- custom format
- deterministic dependency resolution
pyproject.toml
poetry
- standard (PEP-518)
- deterministic dependency resolution
pipenv
🚧 TODO 🚧
poetry
Useful and Common Commands
$ poetry new <project_name>
$ cd ~/path/to/project
$ poetry add <package_name>
$ poetry run python ~/path/to/project/some_script.py
$ poetry shell
$ . $HOME/.cache/pypoetry/virtualenvs/<project_name>-<some_hash>-py<version>/bin/activate