Bug 1394492 - Cannot import PIL.ImageCms: ImportError: No module named _imagingcms
Summary: Cannot import PIL.ImageCms: ImportError: No module named _imagingcms
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-pillow
Version: 7.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-12 15:24 UTC by Orion Poplawski
Modified: 2017-02-06 17:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-06 17:52:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Orion Poplawski 2016-11-12 15:24:41 UTC
Description of problem:

# python
Python 2.7.5 (default, Aug  2 2016, 04:20:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL.ImageCms import get_display_profile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/PIL/ImageCms.py", line 85, in <module>
    import _imagingcms
ImportError: No module named _imagingcms

Version-Release number of selected component (if applicable):
python-pillow-2.0.0-19.gitd1c6db8.el7.x86_64

Comment 2 Charalampos Stratakis 2017-02-06 17:10:21 UTC
The problem here is that the version of python-pillow that is shipped in RHEL 7 builds some it's extensions (including the _imagingcms) by using lcms1, however in RHEL 7 we ship the lcms2 which is incompatible, thus the extension is not compiled during build time.

This pull request from upstream introduced that which is 32 commits:
https://github.com/python-pillow/Pillow/pull/380

The solutions here would be:
either reintroduce lcms1 in RHEL 7 (highly unlikely and undesirable as well)

Backport the commits from the mentioned pull request (might be error prone for this range of commits)

Rebase python-pillow to >= 2.3.0 so the extensions can be build (which might introduce other issues)


I would most possibly go with rebasing python-pillow option, however it seems like a lot of resources will have to be used for unknown impact.

I'm a bit inclined to close this as WONTFIX

Orion what is the impact of that bug?

Comment 3 Orion Poplawski 2017-02-06 17:45:55 UTC
This came from trying to get xpra working on EL7.  I've run into a fair amount of other issues so it may be a lost cause.

Comment 4 Charalampos Stratakis 2017-02-06 17:52:24 UTC
I suppose you could try to get it working by setting a copr with a rebased python-pillow.

Nevertheless closing this as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.