Skip to content

Failing to load Image from PIL in macOS with 9.4.0 #6862

@jbeghtol

Description

@jbeghtol

We are currently using PIL on macOS inside a VENV to limit packaged. Today when we updated to 9.4.0 PIL stopped working on MacOS (these are x86_64 versions).

Steps to reproduce:

  1. setup venv (this was seen in python 3.9.4, 3.9.6, and also a 3.8.x version I don't recall)
  2. pip install Pillow
  3. python, from PIL import Image

(note, some parts of the path were trimmed)

python3
> from PIL import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".venv/lib/python3.9/site-packages/PIL/Image.py", line 103, in <module>
    from . import _imaging as core
ImportError: dlopen(.venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so, 2): Library not loaded: @loader_path/libXdmcp.6.dylib
  Referenced from: .venv/lib/python3.9/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
  Reason: no suitable image found.  Did find:
	.venv/lib/python3.9/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
	.venv/lib/python3.9/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)

Have seen this on two different machines and it was reproducible on both after recreating a venv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions