Henning von Bargen added the comment: The online help says:
""" When Python is hosted in another .exe (different directory, embedded via COM, etc), the “Python Home” will not be deduced, so the core path from the registry is used. Other “application paths” in the registry are always read. """ and """ If the environment variable PYTHONHOME is set, it is assumed as “Python Home”. Otherwise, the path of the main Python executable is used to locate a “landmark file” (Lib\os.py) to deduce the “Python Home”. If a Python home is found, the relevant sub-directories added to sys.path (Lib, plat-win, etc) are based on that folder. Otherwise, the core Python path is constructed from the PythonPath stored in the registry. """ So I set PYTHONHOME=c:\python278, then call LisaReportingServer.exe again. Now the output for sys.path looks OK to me, but "import hmac" still fails: C:\Lisa\Kronos\reporting\test\bin>..\..\bin\win32-x86\LisaReportingAgent.exe Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> for f in sys.path: print f ... C:\Lisa\Kronos\reporting\test C:\WINDOWS\system32\python27.zip c:\python278\DLLs c:\python278\lib c:\python278\lib\plat-win c:\python278\lib\lib-tk C:\Lisa\Kronos\reporting\bin\win32-x86 c:\python278 c:\python278\lib\site-packages c:\python278\lib\site-packages\win32 c:\python278\lib\site-packages\win32\lib c:\python278\lib\site-packages\Pythonwin >>> import hmac Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python278\lib\hmac.py", line 8, in <module> from operator import _compare_digest as compare_digest ImportError: cannot import name _compare_digest >>> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22139> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com