Hi all,
Current I work for embedded python to C.
My environment is windows.
When I call python function from C it show
ImportError: DLL load failed while importing _ctypes
But this operation success when I used python interprator directly.
I have checked python and C config as same and they are listed below and _ctype is put C:/msys64/mingw32/lib/python3.11/lib-dynload
already.
{'data': 'C:/msys64/mingw32',
'include': 'C:/msys64/mingw32/include/python3.11',
'platinclude': 'C:/msys64/mingw32/include/python3.11',
'platlib': 'C:/msys64/mingw32/lib/python3.11/site-packages',
'platstdlib': 'C:/msys64/mingw32/lib/python3.11',
'purelib': 'C:/msys64/mingw32/lib/python3.11/site-packages',
'scripts': 'C:/msys64/mingw32/bin',
'stdlib': 'C:/msys64/mingw32/lib/python3.11'}
['C:/msys64/home/hidden1/hidden2',
'C:/msys64/mingw32/lib/python311.zip',
'C:/msys64/mingw32/lib/python3.11',
'C:/msys64/mingw32/lib/python3.11/lib-dynload',
'C:/msys64/mingw32/lib/python3.11/site-packages',
'C:/msys64/home/TJWu/ToStanley/auo_py/__init__.py/..']
----- update -----
When I use import sysconfig print(sysconfig.get_config_vars())
in __init__.py (under ctypes folder)
compare two configs only one difference
# diff python c
1159c1159
< 'projectbase': 'C:/msys64/mingw32/bin',
---
> 'projectbase': 'C:/msys64/home/hidden1/hidden2',
1168d1167