AIX Open Source

 View Only

 import PIL.Image doesnt work when its from a c program using libpython.so

philip miloslavsky's profile image
philip miloslavsky posted Thu May 22, 2025 09:07 AM

sudo dnf update

sudo dnf install python3.9-pillow

pmilosla@REMOTE@p9aixdev4-openxl:~> python3

Python 3.9.20 (main, Sep 27 2024, 03:16:26)

[GCC 10.3.0] on aix

Type "help", "copyright", "credits" or "license" for more information.

>>> import PIL.Image

>>>

USER>:P

Python 3.9.20 (main, Sep 27 2024, 03:16:26)

[GCC 10.3.0] on aix

Type quit() or Ctrl-D to exit this shell.

>>> import PIL.Image

Traceback (most recent call last):

  File "<input>", line 1, in <module>

  File "/opt/freeware/lib64/python3.9/site-packages/PIL/Image.py", line 88, in <module>

    from . import _imaging as core

ImportError:    0509-022 Cannot load module /opt/freeware/lib64/libtiff.a(libtiff.so.6).

        0509-150   Dependent module /scratch/pmilosla/iris/p9aixdev4-openxl/LATEST/bin/libzstd.a(libzstd.so.1) could not be loaded.

        0509-152   Member libzstd.so.1 is not found in archive

philip miloslavsky's profile image
philip miloslavsky

I think this is because we ship a libzstd.a with our product

Ranjit Ranjan's profile image
Ranjit Ranjan

Yes. That's right.
is libzstd.so.1 part of your libzstd.a file ? Can you verify it using 'dump -X32_64 -Hov <file_path>'
BTW, which compiler is used to build this libzstd.a.

Let us know if you need any help on this.

Thanks
Ranjit