[Tutor] pip install in a virtualenv *without* internet?

Mike C. Fletcher mcfletch at vrplumber.com
Wed Aug 19 23:04:33 CEST 2015

On 15-08-19 05:27 AM, Alex Kleider wrote:
> On 2015-08-18 19:32, Mike C. Fletcher wrote:
>> To install without going out to the internet, you can use these 
>> arguments:
>>     pip install --no-index --find-links=/path/to/download/directory 
>> <packages>
> For this to work, /path/to/download/directory would, I assume, first 
> have to be populated.
> I further assume that running wget from within that directory might do 
> the trick.
> Can you suggest the correct parameter(s) that need to be provided?
> If anyone happens to know approximately how much file space would be 
> required, that would be helpful.

I'm not sure what packages you are trying to install, so can't answer 
the space question, but the easiest command to populate the directory is 
pip on the internet-connected machine:

     pip install --download=~/packages <packages>

now copy that directory onto your USB key (or whatever) and take it to 
the offline machine. If you're planning to do a *lot* of installations, 
you can also use (once you install the wheel package):

     pip wheel --no-index --find-links=/path/to/download <packages>

to create fast-installing wheels from each of the dependencies (do that 
on the target machine so that all libraries match).


   Mike C. Fletcher
   Designer, VR Plumber, Coder

More information about the Tutor mailing list