2

I have both 3.10 and 3.11b3 installed on my windows 10 machine. I'd like py.exe to launch 3.10.

I had read that I should create py.ini and pyw.ini in both c:\windows and C:\Users\<user>\AppData\Local\Programs\Python\Launcher\ and the files should contain:

[defaults]
python=3.10

Multiple Python versions installed : how to set the default version for py.exe (Python Launcher for Windows) for CMD and for "Open with"

I set these up after installing 3.11b3, but py.exe launches the beta. I don't have any other py.ini files. How do I fix this so c:\windows\py.exe launches my preferred default version?

Two possible solutions have other issues. I could set PY_PYTHON=3.10, but that also changes python which is a problem in a venv. I could also use py -3.10, but I don't understand why the listed solution isn't working.

foosion
  • 7,619
  • 25
  • 65
  • 102

1 Answers1

0

Check the encoding of your .ini files: They should be in UTF-8.

(UTF-8 with BOM doesn't work. Bug reported here).

Then follow the steps mentioned in this answer.

JinSnow
  • 1,553
  • 4
  • 27
  • 49