Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I download a PyPI package for pip installation at a later date?

I have a pip requirements file with pinned package versions. I need to install PyPI packages on a system without a direct internet connection. How can I easily download the packages I need now, for pip installation later, without visiting each package page myself?

like image 820
lofidevops Avatar asked Mar 20 '14 11:03

lofidevops


1 Answers

The pip documentation has a good example of fast and local installs:

$ pip install --download <DIR> -r requirements.txt
$ pip install --no-index --find-links=[file://]<DIR> -r requirements.txt

This is mostly for speed, but if you do the first step on an internet connected machine, copy the files to the other machine, then run the second step, you should be able to install all of your requirements without an internet connection.

like image 134
ford Avatar answered Sep 24 '22 23:09

ford