Issue 28726: py.exe launches wrong version (original) (raw)

Created on 2016-11-17 15:56 by pravic, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg281045 - (view) Author: Pravic Ehysta (pravic) Date: 2016-11-17 15:56
d:\>py -3.5 Requested Python version (3.5) not installed d:\>py -3.3 Requested Python version (3.3) not installed d:\>py -3.4 Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22🔞55) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^Z
msg281048 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-11-17 16:19
Can you do "set PYLAUNCH_DEBUG=1" and then run "py -3.4" again and paste the full output? Also, is there anything unusual about how you installed Python? Did you customize any settings?
msg281051 - (view) Author: Pravic Ehysta (pravic) Date: 2016-11-17 16:34
d:\>py -3.5 launcher build: 32bit launcher executable: Console File 'C:\Users\owle\AppData\Local\py.ini' non-existent File 'C:\Windows\py.ini' non-existent Called with command line: -3.5 locating Pythons in 64bit registry locate_pythons_for_key: D:\perl\python\278\python.exe is a 32bit executable locate_pythons_for_key: D:\perl\python\278\PCBuild\win32\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\278\PCBuild\amd64\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\278\PCBuild\python.exe: ??????? ?? ??????? ????? ????????? ????. HKCU\SOFTWARE\Python\PythonCore\3.4\InstallPath: ?? ??????? ????? ????????? ????. HKLM\SOFTWARE\Python\PythonCore\2.7\InstallPath: ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\3\python.exe is a 64bit executable locate_pythons_for_key: D:\perl\python\3\PCBuild\win32\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\3\PCBuild\amd64\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\3\PCBuild\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\Perl\python\3\python.exe: already found locate_pythons_for_key: D:\Perl\python\3\PCBuild\win32\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\Perl\python\3\PCBuild\amd64\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\Perl\python\3\PCBuild\python.exe: ??????? ?? ??????? ????? ????????? ????. locating Pythons in native registry locate_pythons_for_key: D:\perl\python\278\python.exe: already found locate_pythons_for_key: D:\perl\python\278\PCBuild\win32\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\278\PCBuild\amd64\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\278\PCBuild\python.exe: ??????? ?? ??????? ????? ????????? ????. HKCU\SOFTWARE\Python\PythonCore\3.4\InstallPath: ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\2\python.exe is a 32bit executable locate_pythons_for_key: D:\perl\python\2\PCBuild\win32\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\2\PCBuild\amd64\python.exe: ??????? ?? ??????? ????? ????????? ????. locate_pythons_for_key: D:\perl\python\2\PCBuild\python.exe: ??????? ?? ??????? ????? ????????? ????. HKLM\SOFTWARE\Python\PythonCore\3.4\InstallPath: ?? ??????? ????? ????????? ????. search for Python version '3.5' found no interpreter Requested Python version (3.5) not installed It seems, there are old registry keys which were not deleted by installer. HKEY_CURRENT_USER\Software\Python\PythonCore - contains 2.7 and invalid 3.4 (with "modules" subkey only) HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore - contains 2.7 (modules only), 3.4 and 3.5. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore - contains 2.7 and 3.4 (modules only). Quiet messy. How can I clean my registry without reinstalling site packages?
msg281053 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-11-17 16:47
Were Python 3.5 and 3.4 installed into the same location? That would explain some of the problems. It looks like it's finding it from the 3.4 key and then skipping the 3.5 key because the path is the same - hence "py -3.5" doesn't find it. Also, we apparently are lacking some Unicode support in the launcher :) If you delete all of the PythonCore keys and run repair installs for the versions of Python you want, that will restore the ones you need. Our installer deliberately does not remove anything in site-packages (except for pip, and only if it were installed by our installer).
msg281054 - (view) Author: Pravic Ehysta (pravic) Date: 2016-11-17 16:51
Well, I deleted outdated registry keys, now it works fine. Thanks for helping and I am going to close this issue since it isn't a bug.
History
Date User Action Args
2022-04-11 14:58:39 admin set github: 72912
2016-11-17 16:51:09 pravic set status: open -> closedresolution: not a bugmessages: +
2016-11-17 16:47:03 steve.dower set messages: +
2016-11-17 16:34:39 pravic set messages: +
2016-11-17 16:19:57 steve.dower set messages: +
2016-11-17 15:56:15 pravic create