6

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!

1
  • 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 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. Commented Mar 26, 2021 at 23:08

1 Answer 1

4

You were on the right path. In your case, you would need to add 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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.