Is there a way to just install the Py launcher from a Python distribution, and nothing more?
I’m building a Python version management tool (a wrapper around running installer with GUI and registry reading), but installing the launcher requires me requesting administrator privilege, which I would like to avoid. What I want to do is to ship the Py launcher with the tool, so I only need to elevate one time during setup, and avoid it later altogether with just-for-me installations.
One approach I tried is to ship a Python installer with my installer, and run
installer.exe /quiet LauncherOnly=1
during setup. This installs the launcher correctly, but still registers the Python version as installed. I know I can remove it with
installer.exe /uninstall
but that means user interaction would be required, which is less than ideal.
I dug into the Python source and found the launcher installer is built separately, but couldn’t find it being distributed separately, only as a part of the main installer. Not being familiar with Visual Studio, I couldn’t figure out how to build it independently either.
Any suggestion how I can proceed? Either pointers on how to resolve the installation problem, or how I can build/find a standalone Py launcher installer? (I know there are some binaries on the original project page, but they are more than two years old, and are not likely to receive any updates in the future.)
Short answer: No, there is not, at least for now.
I got confirmation from Steve Dower on BPO-31694 that the current installer architecture makes this impossible. Rearchitecting is possible, but not probably not happening in near future.
My workaround is to prevent using the EXE installer at all. The installer really is just a wrapper around multiple MSIs that install various parts of the CPython distribution. I successfully installed Py Launcher without the CPython distribution by downloading and running the corresponding MSI directly.
The MSI can be found at
https://www.python.org/ftp/python/{version}/{architecture}/launcher.msi
version: the Python version, e.g. 3.6.3architecture: either win32 or amd64I don’t think the URLs are publicly supported, but they should be valid for all current versions since they are used by the web-based installer as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With