Skip to content

Py launcher for Windows doesn't open Python 3.11 #115683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Welding-Torch opened this issue Feb 19, 2024 · 6 comments
Closed

Py launcher for Windows doesn't open Python 3.11 #115683

Welding-Torch opened this issue Feb 19, 2024 · 6 comments
Labels
OS-windows type-bug An unexpected behavior, bug, or error

Comments

@Welding-Torch
Copy link

Welding-Torch commented Feb 19, 2024

Bug report

Bug description:

Hi there,

I installed Python 3.11 from the Microsoft Store today. I already have Python 3.9 (Installed from the Microsoft Store) and Python 3.8 (Installed from Thonny) on my laptop. If I try to launch either of those two Pythons using py launcher, I can do that. But if I try to launch Python 3.11, I get this error:

image

The Application was unable to start correctly.

Is the py launcher not able to work with Python 3.11 from the Microsoft Store?

You may reproduce this example and try, please let me know if it is reproducible.

Similar issue:
#99442 handled by @zooba.

CPython versions tested on:

3.11

Operating systems tested on:

Windows

@Welding-Torch Welding-Torch added the type-bug An unexpected behavior, bug, or error label Feb 19, 2024
@zooba
Copy link
Member

zooba commented Feb 19, 2024

Where did you install the launcher from? And if it's from 3.8 (seems likely, from your description), then yes, it doesn't have support for Store installs.

You can download the current latest version of the launcher (on its own) using winget install Python.Launcher1 or from https://www.python.org/ftp/python/3.12.2/win32/launcher.msi ,2 which will update you to a version with support.

Footnotes

  1. I believe this is the right command line, though I haven't tried it just now.

  2. This will only be the latest until the next release happens, but the structure of the URL isn't going to change, so substitute the current release in place of 3.12.2 to get the latest.

@Welding-Torch
Copy link
Author

Thanks for the quickly reply.

I can't recall where I got the py launcher from because I got it in 2019, as confirmed by the date on the file:
image

And if it's from 3.8 (seems likely, from your description), then yes, it doesn't have support for Store installs.

Well, I'm able to switch between Python 3.9 (Installed from the Microsoft Store) and Python 3.8 (Installed from Thonny) easily using py. I just set python=3.9 or python=3.8 in the py.ini file, and it switches seamlessly.

I'll download the latest version of the launcher and LYK if it detects Python 3.11

@Welding-Torch
Copy link
Author

Running winget install Python.Launcher did not fix it. Actually, it didn't change the in C:/Windows/py.exe file at all.

temp, del later
The Application was unable to start correctly.

@Welding-Torch
Copy link
Author

Welding-Torch commented Feb 20, 2024

I tried installing the .msi file. Interestingly, now there are two py.exe files on my laptop.
image

And launching the second py.exe from my AppData folder works. It successfully opens Python 3.11, but now I have two py.exe on my laptop.

@zooba
Copy link
Member

zooba commented Feb 20, 2024

You should be able to find "Python Launcher" in Programs and Features and remove one/both.

I think Winget changed their logic to only do per-user installs and just ignore all user ones, which is why it'll fail there. (They had some issue with people who use Winget to update everything all at once... I didn't quite follow, tbh.)

@Welding-Torch
Copy link
Author

Welding-Torch commented Feb 20, 2024

Yes, you are right. I was able to remove the old "Python Launcher" in Programs and Features.

image

Thanks for your help! I'll mark this issue as closed. Hope it helps someone else who stumbles across it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants