Opened 11 years ago

Closed 10 years ago

#42917 closed defect (fixed)

py-pil: conflicts with py-Pillow

Reported by: dbevans (David B. Evans) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stromnov (Andrey Stromnov), petrrr
Port: py-pil

Description

py-pil conflicts with py-Pillow as follows:

--->  Activating py27-pil @1.1.7_7
Error: org.macports.activate for port py27-pil returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pilconvert.py is being used by the active py27-Pillow port.  Please deactivate this port first, or use 'port -f activate py27-pil' to force the activation.
Error: Failed to install py27-pil

py-Pillow is marked conflicts py-pil but not the other way round.

As an aside, I understand that py-Pillow is a fork of py-pil.

I wonder if these two ports are drop in replacements for each other and if so is there a way to declare a dependency that can be satisfied by either one? Currently some ports use one and others another which causes installation problems if you need both.

Change History (5)

comment:1 Changed 11 years ago by stromnov (Andrey Stromnov)

Yes, Pillow is a fork of PIL, which incorporates some long awaited patches and supports py3k. (Actually, PIL 1.1.7 was released more than 4 years ago).

PIL and Pillow use the same Python namespace 'PIL', so those packages can't be both installed at the same time.

Also, Pillow is not 100%-compatible drop-in for PIL:

PIL allows:

import Image  # old style
...
from PIL import Image
...
import PIL.Image

while Pillow don't support first variant, and some outdated packages, which depends on old PIL style, will require some patching.

comment:2 in reply to:  1 Changed 11 years ago by dbevans (David B. Evans)

Replying to stromnov@…:

Yes, Pillow is a fork of PIL, which incorporates some long awaited patches and supports py3k. (Actually, PIL 1.1.7 was released more than 4 years ago).

PIL and Pillow use the same Python namespace 'PIL', so those packages can't be both installed at the same time.

Also, Pillow is not 100%-compatible drop-in for PIL:

PIL allows:

import Image  # old style
...
from PIL import Image
...
import PIL.Image

while Pillow don't support first variant, and some outdated packages, which depends on old PIL style, will require some patching.

Thanks for the clear explanation. I take it then that Pillow is the recommended choice for new development or is that a political statement?

comment:3 Changed 11 years ago by stromnov (Andrey Stromnov)

I don't know, really. I just use new PIL style.

Note, most of py3k packages de-facto supports Pillow (PIL not compatible with py3k). So, if package support py3k, then it (probably) compatible with Pillow.

comment:4 Changed 11 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:5 Changed 10 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed
Version: 2.2.1

Fixed in r122317.

Note: See TracTickets for help on using tickets.