[issue43898] Python fails to import .dylib but works when extension is changed to .so

Ellis trisk-grove report at bugs.python.org
Wed Apr 21 03:01:58 EDT 2021


Ellis trisk-grove <etriskgrove at gmail.com> added the comment:

This is with regards to an python extension written in zig (I believe the same behaviour would occur from C as I am just using Python.h). What happens is when I compile the library on my mac it generates myLibrary.dylib file, when testing with python the following occurs:

    >>> import myLibrary
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'myLibrary'

However when changing the name of myLibrary.dylib to myLibrary.so python manages to import and use it as it should.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43898>
_______________________________________


More information about the Python-bugs-list mailing list