henon / Python.Included

A Python.NET based framework enabling .NET libraries to call into Python packages without depending on a local Python installation.
MIT License
313 stars 51 forks source link

Is it possible to change the version of python used? #48

Closed hrntsm closed 1 year ago

hrntsm commented 1 year ago

First of all, thanks for a great library!

I want to use python3.9, but the latest Python.Included v3.11.1 gives me python3.11. Is it possible to change it?

I am using Python.Included.Installer.SetupPython() method.

henon commented 1 year ago

Yes and no. No because Python.Included will publish the most up-to-date python versions as I am short on time and motivation to write a release script that will build nuget packages with all available python versions.

And yes, because there is also the Python.Deployment nuget https://www.nuget.org/packages/Python.Deployment which is specifically designed to deploy any python version which you embed in your assembly yourself (or it can also download it from an internet source). Look at the examples in the source code on how to do it.