I trying to implement python (3.6 anaconda x64) to c++. For It I implement Python.h, python36.dll,python36.lib. Anaconda added itself to Path.
Problem is here:
When I call Py_Initialize();
It gives me This error(I also wonder you get PythonHome):
Py_GetPythonHome: (null)
Py_GetPrefix:
Py_GetPath: C:\Users\elnur\source\repos\Neural Net\x64\Release\python36.zip;.\DLLs;.\lib;C:\Users\elnur\source\repos\Neural Net\x64\Release
Before
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00003ab4 (most recent call first):
Of course, you can say that simply add PYTHONHOME to Variables and it will work. But NO. If I will do it it will works fine for C++, but not for Anaconda. After this, Anaconda gives me error that there isn't any conda module and couldn't activate.
I need a real issue(solution) for this problem. As I read all forums,all questions,all docs, but NOTHING!!!!!
User contributions licensed under CC BY-SA 3.0