Message258198
Probably this is related to issue 25824. When built as a console application and run from the command prompt, you should see an the error
ImportError: No module named site
If that's the case, the problem is that even the 64-bit build is incorrectly setting the DLL version string to "2.7-32":
0:000> da poi(python27!PyWin_DLLVersionString)
00000000`50b878c0 "2.7-32"
So the interpreter is looking at the wrong registry key to get the default sys.path:
python27!getpythonregpath+0x110:
00000000`509a3d90 ff15b2d20500 call qword ptr
[python27!_imp_RegOpenKeyExA (00000000`50a01048)]
ds:00000000`50a01048=
{ADVAPI32!RegOpenKeyExAStub (00007ffb`56f87d70)}
0:000> da @rdx
00000037`e4fd9940 "Software\Python\PythonCore\2.7-3"
00000037`e4fd9960 "2\PythonPath"
As a workaround, before calling Py_Initialize, add Py_SetPythonHome("C:\\Python27"), or wherever you installed Python. Or create a symbolic link to Python's Lib directory in the directory that has your executable:
mklink /d Lib "C:\Python27\Lib"
Or 'fix' the "SOFTWARE\Python\PythonCore\2.7" registry key by renaming it to "2.7-32". Or downgrade to 2.7.10 until 2.7.12 is released.
That said, probably you'll use a zipped library if distributing an application, in which case this shouldn't be a problem. |
|
Date |
User |
Action |
Args |
2016-01-14 12:52:23 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, zach.ware, steve.dower, David Heffernan |
2016-01-14 12:52:23 | eryksun | set | messageid: <1452775943.08.0.202076881758.issue26108@psf.upfronthosting.co.za> |
2016-01-14 12:52:23 | eryksun | link | issue26108 messages |
2016-01-14 12:52:22 | eryksun | create | |
|