Py launcher: register a python install that's not found?

How to instruct the Windows py.exe launcher about python installs it doesn’t find automatically?

» py -0p
 -V:3.12 *        C:\apps\python\python.exe
 -V:2.7-32        C:\Python27\ArcGIS10.8\python.exe

I want it to also see:

C:\Program Files\QGIS 3.32.0\bin\python.exe

Maybe this helps: PEP 514 – Python registration in the Windows registry |

This is how the Python launcher finds Python installations according to this: 4. Using Python on Windows — Python 3.12.0 documentation

hmm. The Company and Tag sections seem to be most relevant. I’m not sure I want to embark on registry edits, but I know where to start now if the itch grows that strong.

You could also look into the Packaging category for some answers. I seem to recall that this topic might have been addressed there already, but also maybe it was just a tangentially related topic.

Maybe @steve.dower has some suggestions.

PEP 514 is the way to do it. If it’s just for your own machine, you can pick any Company and Tag you like - they’ll both appear in the -0p output (see the last entry in this example):

C:\> py -0p
 -V:3.13 *        C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.161.0_x64__3847v3x7pw1km\python3.13.exe
 -V:3.12          C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.240.0_x64__3847v3x7pw1km\python3.12.exe
 -V:ContinuumAnalytics/Anaconda39-64 C:\Users\stevdo\Miniconda3_2\python.exe

Bear in mind that the launcher will match any company if you pass py -V:tag, or the “latest” tag if you pass py -V:company/, so depending on how you decide which version you want to run, you can probably choose a scheme that’ll suit you.

(If you don’t use the -V option, it’ll only search PythonCore tags, just like the older version of the launcher that didn’t fully support PEP 514.)

1 Like

ok thanks, and to be sure I’m clear: the minconda at bottom is there because you added registry key for it, right?

The Anaconda and Miniconda installers register themselves, and have done for a long time (hence why they’re registered under the old company name instead of “Anaconda”, though I’m sure they’ll update it when they notice :wink: )

Ah, thanks. I’ve switched to use using micromamba which, apparently, doesn’t do that.