Alex Lelekov
Alex Lelekov

Reputation: 61

How to install the Python package without the Internet

There is a python 2.7 build (Python 2.7.14 (default, Jan 16 2018, 16:11:42) [MSC v.1800 64 bit (AMD64)] on win32) with the pip 9.0 and wheel packages installed.

Windows 7. No MSVC compiler. There is no Internet, only a flash drive.

Need a package pillow. On the official website there is an egg. I can not install the package - can not find the DLL.

What I tried:

  1. I tried to unpack egg in the site-packages directory.

  2. python -m pip install "D: \ ShadowProg \ Pillow-5.3.0-cp27-cp27m-win_amd64.whl"

I took precompiled wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow

The error in both cases is the same:

from PIL import Image

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "C:\FreeCAD 0.17\bin\lib\site-packages\PIL\Image.py", line 64, in

from . import _imaging as core

ImportError: DLL load failed: The specified module could not be found.

Installation without compiler is highly desirable. Please advise what to do?

Upvotes: 0

Views: 791

Answers (1)

grapes
grapes

Reputation: 8636

Just spent ages with same problem - need to install Twisted on an offline machine with Windows 10.

Finally what have I done:

  1. Find another machine with same OS, internet and VC++ (needed to install Twisted)
  2. Install all needed packages on that machine into virtualenv
  3. Copy full virtualenv folder to destination PC

You paths should be exactly the same! If on source machine virtual env was c:\myproject\venv, it should remain on destination PC! Otherwise you will need some manual work with fixing paths, which I believe you would prefer to avoid.

Also take care - Python versions should be the same. I failed with 32bit/64bit versions at first

Upvotes: 1

Related Questions