Privacy Policy
Snippets index

  Offline Python Packages installation with pip

Download the sdist tarballs form PyPI

$ pip install --download /path/to/some/dir package

Example:

$ pip install --download $HOME/local/PyPI_downloads/ ipython

This will download the sdist tarballs for ipython and all its dependencies to /path/to/some/dir (but will not install them).

Install the package using the locally downloaded tarball

pip install --no-index --find-links file:/path/to/some/dir/ package

Example:

pip install --no-index --find-links file:/Users/morlandi/local/PyPI_downloads/ ipython

Notes

The same process works if you replace ipython in both commands with -r requirements.txt, where requirements.txt is a pip requirements file listing all the packages you want (and optionally the versions you want).