If I want to use the
pip command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?
I've tried various command-line options, but it always seems to unpack and delete the zipfile - or it gets the zipfile, but only for the original package, not the dependencies.
This question is tagged with
~ Asked on 2011-09-04 15:42:36
pip install --download is deprecated. Starting from version 8.0.0 you should use
pip download command:
pip download <package-name>
~ Answered on 2016-07-03 09:33:07
--download-cache option should do what you want:
pip install --download-cache="/pth/to/downloaded/files" package
However, when I tested this, the main package downloaded, saved and installed ok, but the the dependencies were saved with their full url path as the name - a bit annoying, but all the
tar.gz files were there.
--download option downloads the main package and its dependencies and does not install any of them. (Note that prior to version 1.1 the
--download option did not download dependencies.)
pip install package --download="/pth/to/downloaded/files"
pip documentation outlines using
--download for fast & local installs.
~ Answered on 2011-09-04 16:37:06