The easy answer to your question is to pass the --no-index
option to pip
, which will avoid checking the index for packages.
You really need to setup a local pypi
mirror and just point pip
to that mirror. This is what I do at work where machines are restricted from the Internet. It can get a bit complicated because it requires setting up of a web server (see pypiserver
and this blog which talks about setting up mirrors as per pep-381).
If that's not an option for you, the easiest way to do this is to use basket
. Once you install it (using pip
), just ask it to download packages:
$ basket init # initialize the directory
Repository has been created: ~/.basket
$ basket download django-extensions # this will download any dependencies as well
Then, move the ~/.basket
directory to your machine without Internet, and run:
pip install --no-index -f file:///path/to/.basket django-extensions