How to install Python packages completely offline

On a machine with internet, download the package and every transitive dependency as wheels with pip download. Copy the folder to the offline host. Install with pip install --no-index --find-links=./wheels PACKAGE. Match OS, architecture, and Python version. Or use PyDeps Bundle to resolve the tree, pick Linux glibc or musl, cap Target glibc for older hosts, read OSV and licenses, then download a ZIP. The ZIP includes wheels, optional sdists, install.py, BUILD_REQUIREMENTS.md, and sbom.cdx.json. For a whole project file, use Analyze Project.

What PyDeps adds

Resolve first, pick OS and Python, turn extras on if you need them, and read the sdist notes so you know what is in the ZIP before you copy it.

pip download workflow

Create a wheelhouse with pip download -d ./wheels -r requirements.txt. For a different target platform, add --only-binary=:all:, --platform, and --python-version. Transfer the wheels directory, then install offline with --no-index --find-links.

PyDeps offline bundle

Open any package on PyDeps and use Bundle download (or append #bundle to the URL) to fetch resolved wheels for your OS and Python version.

Try these packages

Related