LeetCode-OpenSource/py-sourcemap

Can't dlopen py_sourcemap.so on OS X, Python 3

danmaftei opened this issue · 0 comments

OS X 10.15.5. I have xcode tools installed.

After pip install py-sourcemap:

>>> import py_sourcemap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py_sourcemap/__init__.py", line 1, in <module>
    from .py_sourcemap import SourcemapParser as InternalParser
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py_sourcemap/py_sourcemap.so, 2): no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py_sourcemap/py_sourcemap.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
	/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/py_sourcemap/py_sourcemap.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00