All Packages
The `all-packages` library is a utility designed to systematically attempt the installation of every package listed on the Python Package Index (PyPI). As of its last major update (v1.0.1 in January 2022), it aimed to install over 349,000 packages. It operates by creating isolated virtual environments for each package, demonstrating the vast scope of the Python ecosystem. Given its specialized and potentially destructive function, it has a very low release cadence.
Common errors
-
ERROR: Cannot install package_b because it requires numpy==1.18, but numpy 1.20 is already installed.
cause Attempting to install all packages inevitably leads to dependency conflicts where different packages require incompatible versions of the same underlying dependency.fixThis problem is inherent to the nature of installing 'all packages' and is largely unfixable in a single environment. It highlights why such an operation is problematic outside of highly isolated, single-package contexts. -
Could not find a version that satisfies the requirement some-package-name
cause A package or one of its dependencies may have been removed from PyPI, renamed, or specific versions might no longer be available, leading to installation failures.fixThis error is expected during the extensive installation process. Individual package failures are common due to the dynamic nature of PyPI. There is no general fix when trying to install 'all' packages; specific problematic packages would need to be identified and skipped manually. -
error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try 'pacman -S python-xyz'
cause On modern Linux distributions (e.g., Arch Linux), `pip` prevents system-wide package installations to avoid breaking OS components (PEP 668).fixAlways use a dedicated virtual environment or the `-d` option of `all_packages install` to direct installations to a non-system managed location. Do not use `--break-system-packages` unless you fully understand the risks of potentially crippling your OS's Python installation.
Warnings
- breaking Attempting to install 'all-packages' can severely destabilize your Python environment and operating system. Installing hundreds of thousands of packages will almost certainly lead to irreconcilable dependency conflicts, overwrites of critical system libraries, and potentially render your Python installation unusable.
- gotcha The process consumes an immense amount of disk space and time. Installing potentially hundreds of thousands of packages requires terabytes of storage and can take many days or weeks to complete, often failing due to various package-specific installation issues or system resource exhaustion.
- gotcha This library can expose your system to security risks. By design, it installs *every* package from PyPI, including those that might be malicious (e.g., via typosquatting or abandoned packages). While PyPI has security measures, no system is perfectly immune.
Install
-
pip install all-packages
Imports
- all_packages
This library is primarily used as a command-line tool, not typically imported within Python scripts. Its functionality is exposed via the 'all_packages' command.
Quickstart
all_packages install # To specify a custom directory for virtual environments: # all_packages install -d ~/my_pypi_collection