Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Python.net crashes with Python 3.13 and 3.14 #2489

Copy link
Copy link
@gusmanb

Description

@gusmanb
Issue body actions

Environment

  • Pythonnet version: 3.0.4
  • Python version: 3.13 and 3.14 alpha
  • Operating System: Windows 11 64 bits
  • .NET Runtime: .net 8.0

Details

Trying to initialize pythonnet with Python 3.13 or higher crashes with MissingMethodException: Failed to load symbol _PyThreadState_UncheckedGet

void Initialize()
{
    Runtime.PythonDLL = "path_to_dll";
    PythonEngine.Initialize(); //crash
}
  • StackTrace:
 en Python.Runtime.Runtime.Delegates.get_Py_IsInitialized()
   en Python.Runtime.Runtime.Py_IsInitialized()
   en Python.Runtime.Runtime.<>c.<Initialize>b__32_0()
   en Python.Runtime.Runtime.TryUsingDll[T](Func`1 op)
   en Python.Runtime.Runtime.Initialize(Boolean initSigs)
   en Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)
   en Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)
   en Python.Runtime.PythonEngine.Initialize()

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.