Skip to content

Mac OSX, Python: import klayout.dbcore, missing libpng16.16.dylib #1265

@lukasc-ubc

Description

@lukasc-ubc

@Kazzz-S

The KLayout Python package is referencing a library "libpng16.16.dylib" that is not installed on my system. I understand that it can be installed by brew. Perhaps this library could be bundled as part of the "pip install" klayout package?

Thank you

(base) iMac-Hickup:anaconda3 lukasc$ pip install klayout
Collecting klayout
  Downloading klayout-0.28.3-cp39-cp39-macosx_10_9_x86_64.whl (16.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.7/16.7 MB 10.4 MB/s eta 0:00:00
Installing collected packages: klayout
Successfully installed klayout-0.28.3
(base) iMac-Hickup:anaconda3 lukasc$ python 
Python 3.9.13 (main, Aug 25 2022, 18:29:29) 
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
im>>> import klayout.dbcore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/lukasc/opt/anaconda3/lib/python3.9/site-packages/klayout/dbcore.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Users/lukasc/opt/anaconda3/lib/python3.9/site-packages/klayout/lib_tl.cpython-39-darwin.so
  Reason: image not found

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions