June 10th, 2013, 02:06 AM
Call python from c
I run c-application on computer, where python installed before.
But when I try to run this application on other computer without
python installation I have got the following error:
Py_Initialize: unable to load the file system codex.
Import error: no module named encoding.
It is clear that Py_Initialize tries to start Enterpreter, but I. Think there
exist the DLL, that possible to call its functions indirectly.
But I Don not how to do it.
I hope anybody may help me.
Thanks in advance
June 10th, 2013, 11:00 AM
I'm guessing by the way you say DLL you are using Windows.
There is a pythonxx.dll (where xx is the version) in the %windir%\System32 directory. So if you are using Python 2.7 on a default setup the file is C:\Windows\System32\python27.dll
This is just the base Python so you may still see errors about being unable to laod modules. The Python on Windows FAQ in the Python documentation has more details.
June 11th, 2013, 03:35 AM
I tried also to work with python33. DLL, but it is not helped.
I added even system var. Pythonioencoding=utf-8,
but also without good results.