Open hanysz opened 6 years ago
Hello, Just wanted to say your step one helped me resolve my issue (same exact error just different software called CRPropa). Thanks a bunch and hopefully those facing the issues I had with the same software can come here to have the same success.
I'm seeing a similar issue. However, I'm pretty sure my build is against Python 3. I've even been able to see the PyInit_XXX entry when I grep into the *.so file.
If it was linked against Python 2, would the 'PyInit_XXX' be there?
I think I've solved this, but I'm posting here in case it helps someone else.
Context: I already have a working python/pip installation and didn't want to install conda, so I tried downloading the Python dependencies using pip3 instead. This seemed to work (apart from there being no pip package for zeromq -- this appears to be included within pyzmq), as I was able to build without errors.
Problem: gtp.sh gives a string of error messages ending with "ImportError: dynamic module does not define module export function (PyInit__elf)". This is a bit cryptic (googling for "dynamic module" doesn't throw up anything useful).
Explanation: "Dynamic module" in this context refers to Python loading a module from a compiled .so file instead of from a .py file. The error is caused by the *.so files being linked against Python 2 libraries instead of Python 3 libraries.
Solution:
make
, docmake -DPYTHON_EXECUTABLE=/usr/bin/python3
python3 -c "import sys; print(':'.join(sys.path))"
to scripts/devmode_set_pythonpath.sh