pip2pi is a tool for building a PyPI-compatible package repository from pip requirements. It takes a requirements.txt file and downloads packages and their dependencies to a local directory that can be served via a web server. Current version is 0.8.2, works with Python 3.8+. Release cadence is infrequent; last release was August 2023.
pip install pip2piVerified import paths — ran on the pinned version, not inferred.
Build a package repository from requirements.txt into /tmp/packages.
Upgrade pip to version 10.0.0 or later.
Use pip2pi 0.8.0+ which uses pip download internally.
Use Python 3.8+ or pin to pip2pi <0.8.2 for Python 2 compatibility (not recommended).
Use --wheel-dir or --find-links options to include pre-built wheels.