Rhino WIP: Python 3.13

Next build of Rhino WIP is going to deploy Python 3.13.3

Why?

Python 3.9 currently shipping with Rhino 8, is going to hit End-of-Life towards the end of 2025.
One of the major wins for having Python 3 in a dotnet app is access to packages that use python C API. if these packages drop support for Python 3.9, then that stops us from getting the more recent package versions inside of Rhino.

Which Python?

Python 3.13. This python is the current stable version and will only be getting security patches by the time Rhino 9 is likely released. It is currently the most recent version supported by Python.NET. VFX platform also suggest updating to Python 3.13 for the 2026 release cycle.

How do I use it?

Just install Rhino WIP and open ScriptEditor like before. It will deploy then new python runtime under ~/.rhinocode/py313-rh9 folder. We have also updated pythonnet to v3.0.5 since it is the latest version and has recently added support for Python 3.13

We have also improved error reporting when language initialization fails. Clicking on the error now opens the logs window with information on how to report the bug:

How does it affect my scripts or published plugins?

There should not be any changes needed to be done to your scripts. Any script with #! python 3 directive or .py3 file extension will automatically choose the new runtime. This includes Grasshopper python 3 scripts as well as any other scripts you run using Rhino command prompt.

:warning:
The only exception is packages that use Python 3 C API (are compiled against python39.dll) and do not have any Python 3.13 builds yet. They might fail install under the new runtime. This is a rare case. Most packages should install with no issues.

Is Rhino 9 going to support legacy Python 3.9?

No. Each Rhino version is fixed to a single Python 3 runtime version. This is what almost any other application that supports Python scripting does as well. We might consider adding an optional Experimental package to support newer or older python versions if there is a solid reason for it.

Is Rhino 9 going to ship with Python 3.13.3?

No. We will keep updating the runtime to newer patches e.g. 3.13.10 during the Rhino WIP life time, but Rhino 9 should remain fixed to Python 3.13.x


Obviously there is a lot that has changed in both of these projects so keep an eye on weird behaviour and crashes and please let me know. Internally our regression tests pass and I can run a script training a model on torch on both platforms.

I would love to hear your thoughts. You can tag me as @eirannejad on any of the comments that are specifically for me.

:rhinoceros::heart::snake:

9 Likes

Will Rhino 9 update to Python 3.14+ in future releases? What is the current version update policy?
@eirannejad

Yay!

2 Likes

Hi Niko -

No:

-wim

Thank you for your explanation! :slightly_smiling_face:

1 Like

@Niko Our bottleneck is the Pythonnet library that we use to connect to the python runtime and the maximum python version that it supports as of now is 3.13