I have installed Pillow for my python 2.75 on Linux Mint Rosa 64bytes but your script don’t see the pill module.
How copy it in my module folder of <Homer>/.config/blender/2.77/scripts/modules for my Blender 2.77a?
EDIT: I have copied the PIL folder (from /usr/lib/python2.7/dist-packages/ ) in my <home>/.config/blender/script/module folder but no found by your script.
For example in my distro, my system python’s site-package directory path is
/usr/lib64/python3.5/site-packages/
in it there is a PIL directory.
(/usr/lib64/python3.5/site-packages/PIL)
just copy it, or make a symlink to your
~/.config/blender/script/modules directory
to make a symlink from terminal (your paths may be different)
By the way your python version should be 3.5 if you re using Blender 2.77a .
A virtualenv python 3.5 installation would work too, It does not need to be system’s python.
I ll try to install the pip directly to the python which ships with blender. It may be more easier.
in my usr/lib/ (for 64bytes off’course) there are python2.6, python2.7, python3, python2.4, python3.5
the official version is python2.7
in his dist-package, i have PIL + PILcompat + Pillow-2.3.0.egg-info
I have placed all in my
~Home/.config/blender/script/module BUT no change!
in python3, there are a dist-package with the same file
PIL + Pillow-2.3.0.egg-info
I placed in the same config folder BUT no change!
Above 3.0=> python3.4 and python3.5 have not a dist-packages folder (?)
Their dist-packages must be elsewhere but where???
def unregister():
del bpy.types.Scene.ImageResizer
bpy.utils.unregister_module(__name__)
del bpy.types.Scene.ImageResizer
Two time the " del bpy.types.Scene.ImageResizer"
An oversight may be…
============================================
Solutions:
I made as you said to create a link but no change with my blender.
I found this:
VERSION = ‘1.1.7’ # PIL version
PILLOW_VERSION = ‘2.3.0’ # Pillow
in Dist-packages of Python3
But in Blender console:
PYTHON INTERACTIVE CONSOLE 3.5.0 (default, Sep 17 2015, 00:00:00) [GCC 4.8.4]
>>> from PIL import Image
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
File “/home/patrinux/.config/blender/2.77/scripts/modules/PIL/Image.py”, line 53, in <module>
from PIL import _imaging as core
ImportError: cannot import name ‘_imaging’
I HAVE FOUND THAT BLENDER load good PIL but something is missing for PIL to work in line 52 of the fist file image.py of PIL:
“from PIL import _imaging as core”
no no it’s good my uri is /home/patrinux/.config/blender/2.77/scripts/modules
I have made a link of PIL of Python3 but no change with Blender.
I have understood, it’s because PIL is compiled for python3 and not python 3.5:
When the image.py search this :
“from PIL import _imaging as core”
it’s in _imaging.cpython-34m-x86_64-linux-gnu.so, file compiled with python3 on my system and not with python3.5.
no no it’s good my uri is /home/patrinux/.config/blender/2.77/scripts/modules
I have made a link of PIL of Python3 but no change with Blender.
I have understood, it’s because PIL is compiled for python3 and not python 3.5:
When the image.py search this :
“from PIL import _imaging as core”
it’s in _imaging.cpython-34m-x86_64-linux-gnu.so, file compiled with python3 on my system and not with python3.5.
So erdinc, we move forward…I found the answer:
I type in Blender console your python question and here is the answer:
/usr/lib/python3/dist-packages and there are PIL there: 1.17 version!
Why your script or Blender don’t use PIL normally??? All is OK!