Contents
Roadmap info from roadmap website
Package Managers
Package managers allow you to manage the dependencies (external code written by you or someone else) that your project needs to work correctly.
PyPI
Β andΒ Pip
Β are the most common contenders but here are some other options available as well:
Feature | PyPI | pip | conda | poetry |
---|---|---|---|---|
Description | The Python Package Index, a repository of Python packages. | A package installer for Python that fetches packages from PyPI. | A cross-language package and environment manager that includes Python packages. | A dependency and packaging manager for Python using pyproject.toml . |
Primary Use Case | Hosting and distribution of Python packages. | Installing and managing Python packages from PyPI. | Managing packages and environments, especially in data science. | Dependency management and packaging for Python projects. |
Package Format | Python packages, including source and binary distributions. | Packages from PyPI, which can be source or wheel distributions. | Packages from Anaconda repository, often binaries and precompiled packages. | Packages specified in pyproject.toml , with metadata for building and dependencies. |
Installation Command | N/A (PyPI is a repository, not a tool). | pip install <package> | conda install <package> | poetry add <package> |
Environment Management | Not applicable. | No built-in environment management. Requires virtualenv or venv . | Built-in environment management. | Integrated environment management via poetry shell . |
Dependency Management | N/A (Handled by pip ). | Dependency management is handled via requirements.txt . | Dependency management is handled via environment.yml . | Dependency management is handled via pyproject.toml . |
Version Control | N/A (Handled by tools using PyPI). | Requires separate tools (e.g., pip-tools ) or manual tracking. | Version control through environment.yml and Conda channels. | Version control of dependencies through pyproject.toml . |
Stability | Stable and widely used. | Stable and widely used. | Stable, with a focus on data science and scientific computing. | Stable, with a focus on project management and packaging. |
Compatibility | Universal Python packages. | Python-only. | Supports Python and other languages (e.g., R, Julia). | Python-only, with a focus on modern packaging. |
Integration | Used in conjunction with pip . | Integrates with virtual environments, CI/CD pipelines. | Integrates with data science tools, environment management. | Integrates with version control systems and build tools. |
Example Usage | N/A (PyPI is accessed via tools like pip ). | shell <br> pip install requests <br> | shell <br> conda install numpy <br> | shell <br> poetry add requests <br> |