This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ecosatto
Recipients ecosatto, paul.moore, steve.dower, tim.golden, zach.ware
Date 2019-04-25.15:28:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556206116.26.0.761997235629.issue36716@roundup.psfhosted.org>
In-reply-to
Content
Hi,

I have a full install of Python from the installer in:
C:\Program Files\Python37
Then, I added libraries using pip.
Everything works fine from the command line Python.

Then, I build my C++ application with VisualStudio and link to the Python DLLs. I start Python inside my app using the usual code:

  Py_SetPath(...);
  Py_SetProgramName(...);
  Py_InitializeEx(0);

  PyRun_SimpleString("import sys");
  PyRun_SimpleString("print(sys.path)");
  PyRun_SimpleString("print(sys.prefix)");
  PyRun_SimpleString("print(sys.executable)");


>> ['C:\\Program Files\\Python37\\DLLs', 'C:\\Program Files\\Python37\\Lib', 'C:\\Program Files\\Python37', 'C:\\Program Files\\Python37\\Lib\\site-packages']
>> C:\Program Files\Python37
>> C:\Program Files\Python37\python.exe

So, everything works fine at this point. If I run the following:

  PyRun_SimpleString("import numpy");


>> ImportError("No module named 'numpy.core._multiarray_umath'")
History
Date User Action Args
2019-04-25 15:28:36ecosattosetrecipients: + ecosatto, paul.moore, tim.golden, zach.ware, steve.dower
2019-04-25 15:28:36ecosattosetmessageid: <1556206116.26.0.761997235629.issue36716@roundup.psfhosted.org>
2019-04-25 15:28:36ecosattolinkissue36716 messages
2019-04-25 15:28:36ecosattocreate