Install new version without upgrade

Is there a way to install python without it upgrading what is there and without using the windows MSI packager on windows 10. Even when we remove all references to python from the environment, it finds the prior version and updates it. We need to lay down multiple subversions (3.8.8, 3.8.13, etc.) from our install package (don’t ask - its a bureaucracy - and they’ve broken pip so it isn’t an option)

Have you tried the Windows embeddable packages?

The embedded distribution is a ZIP file containing a minimal Python environment. It is intended for acting as part of another application, rather than being directly accessed by end-users.

When extracted, the embedded distribution is (almost) fully isolated from the user’s system, including environment variables, system registry settings, and installed packages. The standard library is included as pre-compiled and optimized .pyc files in a ZIP, and python3.dll , python37.dll , python.exe and pythonw.exe are all provided. Tcl/tk (including all dependants, such as Idle), pip and the Python documentation are not included.

https://docs.python.org/3/using/windows.html#the-embeddable-package

That should allow you to use multiple Pythons side-by-side without touching anything in the environment.

You can find their download links here: Python Releases for Windows | Python.org

It really depends on the purpose of it.

If you’re “hiding” Python from your users (or at least, they’re not expecting to be able to treat it like a regular install by creating venvs and using pip etc.), then the embeddable package is probably exactly what you want.

If you need more “normal” installations, then either install it and copy the files out, or get the packages from nuget.org and copy the files out of those, then bundle those files with your app. Either way, that’s not an approach that we support or provide packages for - it’s up to you to support redistributed copies of Python, and hopefully that’s a little less surprising when you’ve had to “steal” the files :wink: