jamesbowman / openexrpython

OpenEXR bindings for Python
Other
95 stars 35 forks source link

Failure to import with MacOS Anaconda, but works with Homebrew's Python 3.6 #8

Open crowsonkb opened 7 years ago

crowsonkb commented 7 years ago

I used pip to build the OpenEXR module directly from GitHub. With the latest Anaconda, I get this error message on import:

% python -c 'import OpenEXR'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen(/Users/kat/anaconda3/lib/python3.6/site-packages/OpenEXR.cpython-36m-darwin.so, 2): Symbol not found: __ZN7Imf_2_214TypedAttributeISsE13readValueFromERNS_7IStreamEii
  Referenced from: /Users/kat/anaconda3/lib/python3.6/site-packages/OpenEXR.cpython-36m-darwin.so
  Expected in: flat namespace
 in /Users/kat/anaconda3/lib/python3.6/site-packages/OpenEXR.cpython-36m-darwin.so

However, it works for me with Homebrew's Python 3.6 for some reason.

cloudhan commented 7 years ago

I encountered similar issue, maybe exactly the same issue, on ubuntu 16.04. It turns out to be incompatible gcc version. I suggest to test with strings /path/to/your/OpenEXR.so | grep GCC strings /path/to/system/provided/libIlmImf.so | grep GCC to see if they are the same version.

uathena1991 commented 6 years ago

@cloudhan do you have any idea why my OpenEXR.so doesn't contain 'GCC' or 'gcc' at all?

cloudhan commented 6 years ago

@uathena1991 Maybe you are not using GCC? Say clang?