Hey,
as I am programming a plugin which uses the Pillow library, I am accounting a big problem on Windows 64 bit. On OS X everything runs as expected.
As Pillow is a 3rd party extension to Python I simply installed it (via pip) in my system Python and than copied the ‘PIL’ folder from the ‘libs/site-packages’ folder into my plugin. Then I appended the plugin directory to the system paths (
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
) to be able to import it.
On Windows I get the following error:
File "C:\Users\<user>\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\<addon-name>\PIL\Image.py", line 67, in <module>
from PIL import _imaging as core
ImportError: cannot import name '_imaging'
The ‘_imaging’ stuff is in a precompiled pyd file (_imaging.cp35-win32.pyd) in the ‘PIL’ folder. Maybe it’s because the _imaging file is a 32 bit version and the Blender Python is looking for a 64 bit version?
Cheers,
Pascal