PIL: DLL load failed: specified procedure could not be found

MLavrentyev picture MLavrentyev · Apr 6, 2017 · Viewed 66.1k times · Source

I've been beginning to work with images in Python and I wanted to start using PIL (Pillow). To install it, I ran pip install Pillow. When installing, PIL was not previously installed. I also tried uninstalling it and reinstalling it, as well as using pip3 install Pillow.

When I run it in Python, my first line is:

File "C:\Program Files\Python36\lib\site-packages\PIL\Image.py", line 56, in <module>
from . import _imaging as core
ImportError: DLL load failed: The specified procedure could not be found.

I checked the directory, and the file _imaging.cp36-win_amd64.pyd is present under the PIL folder.

Why is this happening if the needed DLL is there? How can I fix it?

Answer

Sean picture Sean · Apr 8, 2017

I had this problem as well with Python 3.6. I just avoided the problem by uninstalling pillow (4.1.0) and then installing an older version of pillow (4.0.0). It seems to run okay with the older version.