Installing PIL without internet access

Larry Martell larry.martell at gmail.com
Thu Feb 26 14:22:41 EST 2015


On Thu, Feb 26, 2015 at 11:57 AM, MRAB <python at mrabarnett.plus.com> wrote:
> On 2015-02-26 15:23, Larry Martell wrote:
>>
>> I have a host that has no access to the internet and I need to install
>> PIL on it. I have an identical host that is on the internet and I have
>> installed it there (with pip). Is there a way I can copy files from
>> the connected host to a flash drive and then copy them to the
>> unconnected host and have PIL working there? Which files would I copy
>> for that?
>>
>> This is on CentOS 6.5, python 2.7
>>
> Have a look here:
>
> https://pip.pypa.io/en/latest/reference/pip_install.html#pip-install-options
>
> It says that you can install from a downloaded file, e.g.:
>
> pip install ./downloads/SomePackage-1.0.4.tar.gz

Thanks for the reply. This is very useful info. But I have another
issue I didn't mention. The system python is 2.6,
but I need the 2.7 version. So anything I install with pip will get
installed to 2.6. To get around that on my connected hosts I've done:

easy_install-2.7 pip

and then I install with pip2.7.

But this unconnected host doesn't have easy_install-2.7, so I'd have
to figure out how to get that first.

I think it will work if I just copy
/usr/lib64/python2.7/site-packages/PIL. That worked on a test system I
tried it on. I'll try on the real system tonight.



More information about the Python-list mailing list