3

I'm trying to use the Windows Python Launcher (py.exe) for the first time. I run python in a command shell but the launcher, running in the same shell, can't find any version of python.exe to run:

where python                                          
C:\Python38\python.exe                                  
py --list                                             
Installed Pythons found by py Launcher for Windows      
No Installed Pythons Found!  

                       

Obviously there is something missing in my configuration but I'm at a loss as to what. I've been digging into the registery and have located keys in:

HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Python/PyLauncher   
HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node/Python/PythonCore

but there isn't anything that references any executables.

Any help appreciated!

Anurag Dabas
  • 23,866
  • 9
  • 21
  • 41
dw cagle
  • 31
  • 2
  • 1
    At first I was going to write a pithy comment telling you to read the documentation and how to find it. But then I realized that the information there is actually not very useful for your specific question. Even so, this question seems like a better fit for https://superuser.com (I couldn't find a duplicate there, either). On my own machine, the behaviour is the reverse: `py` finds my Python installations that are not on the PATH, but `where python` comes up empty-handed and `python` only works inside a venv. – Karl Knechtel Mar 26 '21 at 23:08

1 Answers1

0

You was on the right path. In your case, you would need to add the the following entries in the registry:

[HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.8]

[HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.8\InstallPath]
@="C:\\python38\\"
"ExecutablePath"="C:\\Python38\\python.exe"
"WindowedExecutablePath"="C:\\Python38\\pythonw.exe"

Also answered in py launcher does not find my Python 2.7