Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1394492

Summary: Cannot import PIL.ImageCms: ImportError: No module named _imagingcms
Product: Red Hat Enterprise Linux 7 Reporter: Orion Poplawski <orion>
Component: python-pillowAssignee: Python Maintainers <python-maint>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: cstratak, jkejda, orion
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-06 17:52:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.