Opened 9 years ago
Closed 8 years ago
#481 closed defect (fixed)
The _imaging C module is not installed on QGIS 2.12.x Windows 32 bits
Reported by: | jhemmi | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | Installer |
Version: | Keywords: | QGIS Matplotlib _imaging | |
Cc: |
Description
I was following the QGIS issu #13192 since two users of my plugin (PhysiocapAnalyseur) have experimented the error "The _imaging C module is not installed" when writing a tiff with Matplotlib.
It seems to be an installation problem on Windows 32 bits only.
I have reproduced the context problem on an old eeepc 32 bit with a fresh install of QGIS 2.12.2 ( QGIS-OSGeo4W-2.12.2-1-Setup-x86.exe ) in the Console Python:
import PIL
from PIL import _imaging
finish with "DLL load failed" on Windows 32 bits where
matplotlib.version
'1.2.1'
PIL.Image.VERSION
'1.1.7'
It's OK on Linux or Windows 64 bits where
matplotlib.version
'1.3.1'
PIL.VERSION
'1.1.7'
Change History (13)
comment:3 by , 8 years ago
Problem is bit old now, but still persist. I use only PIL modules (without matplotlib) and meet same behavior, problems with import "The _imaging C module is not installed". Solution is to install Pillow instead old PIL. Nice to have Pillow included in new installers (also - only Pillow exist for Python > 3).
comment:4 by , 8 years ago
I copied some missing files from Pillow as a workaround. More complete description here:
comment:5 by , 8 years ago
import PIL import Image import _imaging
doesn't seem to show the problem (python-pil-1.1.7-1)
comment:8 by , 8 years ago
It failed for me when used by reportlab and integrating a .png file.
Are _imaging* files present in your apps/Python27/site-packages/PIL folder?
comment:9 by , 8 years ago
Sure - as python-pil-1.1.7-1.tar.bz2 has them (did also verify that the standalone installers have them - in case this was not strictly about osgeo4w).
C:\OSGeo4W>python Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> from PIL import ImageDraw, ImageFont >>> import _imaging >>> quit() C:\OSGeo4W>dir /s /b _imaging*.* C:\OSGeo4W\apps\Python27\Lib\site-packages\PIL\_imaging.pyd C:\OSGeo4W\apps\Python27\Lib\site-packages\PIL\_imagingcms.pyd C:\OSGeo4W\apps\Python27\Lib\site-packages\PIL\_imagingft.pyd C:\OSGeo4W\apps\Python27\Lib\site-packages\PIL\_imagingmath.pyd C:\OSGeo4W\apps\Python27\Lib\site-packages\PIL\_imagingtk.pyd
comment:10 by , 8 years ago
As I remember problem with PIL was not missing files, but precompiled module with bad paramerets. Main problem is pointed on stackoverflow:
The freetype C library references a debug CRT that is not available on all machines. You can easily patch the _imagingft.pyd file with a hex editor.
Pillow modules work on all tested computers.
comment:13 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
No news about this problem. I checked others issues that can be related : #326, #451 which are open too.
Is 32 bits prohibited for osgeo ?