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 aundro
Recipients aundro
Date 2015-12-08.14:16:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449584200.04.0.891595448742.issue25824@psf.upfronthosting.co.za>
In-reply-to
Content
[First of all let me say I'm not all that familiar with Windows, so please let me know if the wording in my analysis below is not clear and/or misleading.]

It would appear the 32-bit installer for Python 2.7.11 creates the registry key:
---
HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
---
(...just like previous 2.7 versions did.)

However, registry accesses (PC/getpathp.c's getpythonpath()) are done like so:
---
    (...)
    keyBuf = keyBufPtr = PyMem_RawMalloc(keyBufLen);
    if (keyBuf==NULL) goto done;

    memcpy_s(keyBufPtr, keyBufLen, keyPrefix, sizeof(keyPrefix)-sizeof(WCHAR));
    keyBufPtr += Py_ARRAY_LENGTH(keyPrefix) - 1;
    mbstowcs(keyBufPtr, PyWin_DLLVersionString, versionLen);
    (...)
---
where 'PyWin_DLLVersionString' now is "2.7-32":
---
.rsrc:1E2760FA                 unicode 0, <2.7-32>,0
---
(it used to be "2.7" in previous versions) 


Thus, the key that python27.dll builds is:
 HKLM\Software\Wow6432Node\Python\PythonCore\2.7-32\PythonPath
and not
 HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath

and consequently the runtime cannot build a proper sys.path, which causes embedded interpreters to fail loading core modules.

As a workaround, it seems renaming the registry key to its "-32"-suffixed name, does help.
History
Date User Action Args
2015-12-08 14:16:40aundrosetrecipients: + aundro
2015-12-08 14:16:40aundrosetmessageid: <1449584200.04.0.891595448742.issue25824@psf.upfronthosting.co.za>
2015-12-08 14:16:39aundrolinkissue25824 messages
2015-12-08 14:16:39aundrocreate