Title: Python.net crashes with Python 3.13 and 3.14 · Issue #2489 · pythonnet/pythonnet · GitHub
Open Graph Title: Python.net crashes with Python 3.13 and 3.14 · Issue #2489 · pythonnet/pythonnet
X Title: Python.net crashes with Python 3.13 and 3.14 · Issue #2489 · pythonnet/pythonnet
Description: 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: F...
Open Graph Description: 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 highe...
X Description: 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 highe...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/2489
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python.net crashes with Python 3.13 and 3.14","articleBody":"### Environment\r\n\r\n- Pythonnet version: 3.0.4\r\n- Python version: 3.13 and 3.14 alpha\r\n- Operating System: Windows 11 64 bits\r\n- .NET Runtime: .net 8.0\r\n\r\n### Details\r\n\r\nTrying to initialize pythonnet with Python 3.13 or higher crashes with `MissingMethodException: Failed to load symbol _PyThreadState_UncheckedGet`\r\n\r\n```c#\r\nvoid Initialize()\r\n{\r\n Runtime.PythonDLL = \"path_to_dll\";\r\n PythonEngine.Initialize(); //crash\r\n}\r\n```\r\n\r\n- StackTrace:\r\n\r\n```c#\r\n en Python.Runtime.Runtime.Delegates.get_Py_IsInitialized()\r\n en Python.Runtime.Runtime.Py_IsInitialized()\r\n en Python.Runtime.Runtime.\u003c\u003ec.\u003cInitialize\u003eb__32_0()\r\n en Python.Runtime.Runtime.TryUsingDll[T](Func`1 op)\r\n en Python.Runtime.Runtime.Initialize(Boolean initSigs)\r\n en Python.Runtime.PythonEngine.Initialize(IEnumerable`1 args, Boolean setSysArgv, Boolean initSigs)\r\n en Python.Runtime.PythonEngine.Initialize(Boolean setSysArgv, Boolean initSigs)\r\n en Python.Runtime.PythonEngine.Initialize()\r\n```\r\n","author":{"url":"https://github.com/gusmanb","@type":"Person","name":"gusmanb"},"datePublished":"2024-10-22T19:44:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/2489/pythonnet/issues/2489"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fc1f49c8-0b22-1cec-5a7f-949999baaa56 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3FC:6CA27:17DE0EB:200276C:69706B76 |
| html-safe-nonce | d2063e56b4fb0d4079f9d54879c459ee0831bce7e80d2d3a555be02e59141d0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0ZDOjZDQTI3OjE3REUwRUI6MjAwMjc2Qzo2OTcwNkI3NiIsInZpc2l0b3JfaWQiOiIyMzI0MDgyNDc4NjYzMzYzNDQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f5f1c0e09f1028bd9356906b0357d8756b36bd22dea756d7e02630e17bde58e5 |
| hovercard-subject-tag | issue:2606333630 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/2489/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9cc004572c4074cd7371fd1428f41af64bc93c9d57c2ffe4677cf62b2687c8b3/pythonnet/pythonnet/issues/2489 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9cc004572c4074cd7371fd1428f41af64bc93c9d57c2ffe4677cf62b2687c8b3/pythonnet/pythonnet/issues/2489 |
| og:image:alt | 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 highe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gusmanb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width