I am trying to convert my python project with cython to c source and compile it with clang,I compile it in a windows vitural machine with python3.8. this is my compile options:
./clang -std=c11 test.c -I"D:\env\python38\include" -L"D:\env\python38\libs" -lpython38 -o test.exe -DMS_WIN64 -municode
It works very well. But when I move test.exe to another windows without python env and run test.exe, it reminds me cant't find python38.dll. Actually when I provide python38.dll in the same dir,it gives the error:
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00001bd8 (most recent call first):
<no Python frame>
I wonder to know if using cython c source to compile exe have to require python installation to execute. Is there any way to compile it without the need of python env at runtime?