Skip to content

Update pythonnet package dependency version to 3.0.5 to support Python 3.13 #25

Closed
@ncguilbeault

Description

@ncguilbeault

The current version of pythonnet does not support the latest version of Python, which is now Python 3.13. If trying to use the Bonsai.Scripting.Python package with Python 3.13, this can lead to the following error thrown by the CreateRuntime node:

Full Error Report Bonsai.WorkflowRuntimeException: The type initializer for 'Delegates' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Delegates' threw an exception. ---> System.MissingMethodException: Failed to load symbol _PyThreadState_UncheckedGet: /lib/x86_64-linux-gnu/libpython3.13.so: undefined symbol: _PyThreadState_UncheckedGet at Python.Runtime.Platform.PosixLoader.GetFunction (System.IntPtr dllHandle, System.String name) [0x00053] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.Runtime+Delegates.GetFunctionByName (System.String functionName, System.IntPtr libraryHandle) [0x00000] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.Runtime+Delegates..cctor () [0x00145] in <7a26ed708f504c339a80dbf5a695df03>:0 --- End of inner exception stack trace --- at Python.Runtime.Runtime.Py_SetPythonHome (System.IntPtr home) [0x00000] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.PythonEngine+<>c.b__27_0 () [0x00000] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.Runtime+<>c__DisplayClass106_0.b__0 () [0x00000] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.Runtime.TryUsingDll[T] (System.Func`1[TResult] op) [0x00033] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.Runtime.TryUsingDll (System.Action op) [0x0000d] in <7a26ed708f504c339a80dbf5a695df03>:0 at Python.Runtime.PythonEngine.set_PythonHome (System.String value) [0x0001e] in <7a26ed708f504c339a80dbf5a695df03>:0 at Bonsai.Scripting.Python.RuntimeManager.Initialize (System.String path) [0x00032] in <0fd3d1b43da9463f93a0e011f39efeca>:0 at Bonsai.Scripting.Python.RuntimeManager+<>c__DisplayClass4_0.<.ctor>b__0 () [0x00000] in <0fd3d1b43da9463f93a0e011f39efeca>:0 at Bonsai.Scripting.Python.RuntimeManager+<>c__DisplayClass15_0.b__0 () [0x00000] in <0fd3d1b43da9463f93a0e011f39efeca>:0 --- End of inner exception stack trace ---

The version of pythonnet should be updated to the latest version (version 3.0.5) to support Python 3.13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions