Forums » Saxon/C Help and Discussions »
Problems to use self built Python extension on Windows: ImportError: DLL load failed while importing saxonche
Added by Martin Honnen 10 months ago
I have tried to build the SaxonC 12.0 HE extension on Windows and I think the extension finally has been built fine.
Now on trying to use it, however, it doesn't seem to find a library:
C:\Program Files\Saxonica\SaxonCHE12.0\pypi>dir
..
Verzeichnis von C:\Program Files\Saxonica\SaxonCHE12.0\pypi
01/26/2023 11:11 AM <DIR> .
01/14/2023 07:19 AM <DIR> ..
01/26/2023 10:58 AM <DIR> build
01/26/2023 11:03 AM 18,432 nodekind.cp39-win_amd64.pyd
01/26/2023 11:11 AM 563 parse_ietf_date_test1.py
01/14/2023 07:19 AM 160 pyproject.toml
01/26/2023 10:50 AM <DIR> python_saxon
01/14/2023 07:19 AM 6,787 README.md
01/14/2023 07:19 AM 25 requirements.txt
01/14/2023 07:19 AM <DIR> samples
01/26/2023 11:03 AM 517,632 saxonche.cp39-win_amd64.pyd
01/26/2023 11:02 AM 3,082 setup.py
01/14/2023 07:19 AM 58,998 test_saxonc.py
01/14/2023 07:19 AM 4,095 test_saxon_schema.py
01/14/2023 07:19 AM 533 tox.ini
10 Datei(en), 610,307 Bytes
5 Verzeichnis(se), 505,411,121,152 Bytes frei
C:\Program Files\Saxonica\SaxonCHE12.0\pypi>py
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from saxonche import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing saxonche: Das angegebene Modul wurde nicht gefunden.
My environment PATH contains C:\Program Files\Saxonica\SaxonCHE12.0\libs\win
and the SaxonC command samples and C++ samples run fine and find any dlls.
What else do I have to set to make sure the Python module finds the (I suppose) C/C++ DLLs?
Replies (2)
RE: Problems to use self built Python extension on Windows: ImportError: DLL load failed while importing saxonche
-
Added by Martin Honnen 10 months ago
I have now tried to built and use the Python extension under WSL Ubuntu but I get a similar error
mh@LibertyDell:~/libsaxon-HEC-linux-v12.0/pypi$ python3
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from saxonche import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /home/mh/libsaxon-HEC-linux-v12.0/pypi/saxonche.cpython-310-x86_64-linux-gnu.so: undefined symbol: j_callTemplateReturningValue
I am kind of lost which setting is missing.
RE: Problems to use self built Python extension on Windows: ImportError: DLL load failed while importing saxonche
-
Added by O'Neil Delpratt 10 months ago
I have also reproduced the same error on linux. Something strange going on here. I will create a bug issue for this problem.
Please register to reply