Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

Rhino Crashes When Initializing Python.NET with CPython (Conda)

$
0
0

Problem Description

I am trying to integrate Python.NET (pythonnet 3.0.4) with CPython 3.7.12 inside Rhino 7, which defaults to IronPython 2.7.12.
The goal is to replace IronPython with CPython, allowing the use of libraries like numpy and scipy in Grasshopper and RhinoPython.

Issue:

  • Rhino only detects IronPython 2.7.12 instead of CPython.
  • sys.executable is None, meaning Rhino cannot find CPython.
  • Calling Python.Runtime.PythonEngine.Initialize() crashes Rhino instantly.
  • All environment variables seem correctly set (PYTHONNET_PYDLL, PYTHONHOME, PYTHONPATH, PATH).

I have attached a .gh file for reference.
gh_pythonnet.gh (2.1 KB)

Can someoe help me with this? Using Rhino8 or Plugins like Hops is not an option. According to Getting Numpy inside Rhino it somehow is working but for now I cannot get it working.

Thanks in advance!
Raphael

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles