I installed the PIL library using the .exe installer of the version 4.0.0 taken from this site (The Python Software Foundation website). Then I checked using the python shell if the PIL library was installed and it didn't give me error, so I assumed that's installed. Then I tried to copy from the installation folder of the library the folder named PIL into the folder C:\Program Files\Blender Foundation\Blender\2.78\python\lib. Then I tried to put in a text "import PIL", and it worked. (Before doing the copy of the folder PIL told me that no PIL modules were installed). Then I tried: "from PIL import Image" and it gave me errors. Any way to make blender use properly the PIL library?

EDIT: The error it gave me it's the following:

Traceback (most recent call last):
File "\Text", line 1, in <module>
File "C:\Program Files\BlenderFoundation\Blender\2.78\python\lib\PIL\Image.py", line 67, in <module>
from PIL import _imaging as core
ImportError: cannot import name '_imaging'
  • $\begingroup$ Please edit your question to include what errors it gave you. $\endgroup$ – Ray Mairlot Jan 3 '17 at 15:44

I solved, I had to check the version of the Python used by Blender. To do this, you need to go in the bin folder (located in the same folder as the lib one), and check the version of python in there and then use the appropriate version of PIL library.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.