Opened 5 years ago

Closed 5 years ago

#58799 closed defect (worksforme)

py-Pillow and py-pil conflict

Reported by: renzresearch Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: stromnov (Andrey Stromnov), jmroot (Joshua Root)
Port: py-Pillow py-pil

Description

Installation of py-scikit-image failed because it requires py27-Pillow. py27-Pillow cannot be installed because of the existing py27-pil. I did not install pil by selection. It was required by some other package. If I replace pil with Pillow, would it break something else?

% sudo port install py-scikit-image
--->  Computing dependencies for py-scikit-image
Error: Can't install py27-Pillow because conflicting ports are active: py27-pil
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py-scikit-image failed

Change History (10)

comment:1 Changed 5 years ago by mf2k (Frank Schima)

Keywords: conflict removed
Port: py-Pillow py-pil added; py-scikit-image removed

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Cc: stromnov jmroot added
Port: py-scikit-image added

Don't forget to Cc the maintainers.

comment:3 Changed 5 years ago by mf2k (Frank Schima)

Port: py-scikit-image removed
Summary: Processing of port py-scikit-image failedpy-Pillow and py-pil conflict

comment:4 Changed 5 years ago by mf2k (Frank Schima)

This is a duplicate #42917.

comment:5 in reply to:  4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to mf2k:

This is a duplicate #42917.

The tickets look related but I wouldn't call this new ticket a duplicate of the old ticket. #42917 was about the fact that the ports conflict but they were not marked as such. The resolution was to mark them as conflicting. This new ticket is about the fact that they conflict and the user does not wish for them to conflict; the user wishes to be able to install both of them.

comment:6 Changed 5 years ago by stromnov (Andrey Stromnov)

https://scikit-image.org/docs/stable/install.html#runtime-requirements

Runtime requirements
...
pillow>=4.3.0
...

https://pillow.readthedocs.io/en/stable/

Pillow is the friendly PIL fork

Pillow is a partial drop-in replacement for PIL with many backward incompatible improvements (like a several major version bumps). Unfortunately, they are occupying the same python module namespace and so they cannot be installed both at the same time. In the wild (outside of MacPorts ecosystem) they often coexist side-by-side in separate virtualenv environments (as well as different versions of the same library).

comment:7 Changed 5 years ago by jmroot (Joshua Root)

Whatever the "some other package" is that caused py27-pil to be installed can probably be changed to depend on py27-Pillow instead. What does port dependents py27-pil say?

comment:8 Changed 5 years ago by renzresearch

Thanks. I replaced py27-pil with py27-Pillow and removed something I don't care. No severe consequence immediately. I notice that under py27-pil "import Image" must be changed to "from PIL import Image" under py27-Pillow. That is OK. However, this happens:

>>> import skimage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skimage/__init__.py", line 167, in <module>
    from .util.dtype import (img_as_float32,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skimage/util/__init__.py", line 6, in <module>
    from .apply_parallel import apply_parallel
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/skimage/util/apply_parallel.py", line 8, in <module>
    import dask.array as da
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dask/array/__init__.py", line 4, in <module>
    from .blockwise import blockwise, atop
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dask/array/blockwise.py", line 16
    name=None,
       ^
SyntaxError: invalid syntax

comment:9 Changed 5 years ago by stromnov (Andrey Stromnov)

Dask 2.x requires Python 3.5+, so py-dask and py-distributed reverted to 1.x for py27 and py34 subports.

comment:10 Changed 5 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: newclosed

So this is as resolved as it's going to get regarding PIL/Pillow. Please open a new ticket if there is an issue with another port.

Note: See TracTickets for help on using tickets.