Using python libraries in Rhino

Hi all,

I am currently using Rhino 7 and Grasshopper 1 remotely. I want to use python 3.10 in rhino because I need to use some python libraries such as pandas, pyKriging or optuna for my implementation. Therefore, I tried to use GH Python remote and it creates a pop-up interface but I don’t want no pop-up interface for my implementation because we run Rhino from command prompt. So I looked up in internet to add a python library to Rhino but I couldn’t find a way to do it. Can you help me to use python libraries in Rhino?

Thank you

I don’t have your direct answer but I believe Rhino 7 GH Python is Iron Python 2.7(something) and Rhino 8 WIP has the ability to utilize IronPython 2+ and Python 3, so if you are using Python 3 libraries I think you need to use Rhino 8 as I don’t believe R7 supports Python 3? (but maybe someone with more experience will let you know it’s possible in R7?)

And I think you can run Rhino headless with python as well to avoid the popup but I haven’t personally tested that, just seen some forum posts about it

Rhino 8 does support Python 3: Rhino 8 Feature: ScriptEditor (CPython, CSharp)

Rhino 7 can link to Python 3 thru Hops. This requires a Python service running on the local machine: Create CPython components using Hops in Grasshopper

2 Likes