Installing Python libraries in Grasshopper

Hi, I am trying to import a script that I made in Python 3.6.5 into Grasshopper using the Python script. In my code I use the following libraries:

  • Numpy
  • Pillow
  • Matplotlib
  • OR-Tools
  • SciPy

There is any way to use them also in the Python component in grasshopper?

I think GH PYTHON REMOTE is what you’re looking for.

I used GhC_Python to use these libraries in gh, and it works pretty well ! It just has some trouble outputing gh format data (lists, trees). The workaround is to put a classical GhPython component behind to get the right format.


So using this component I can run my script as when I run it in IDLE? With all differents library?

GH Python remote seems to only work for python 2.7. Is it possible to get GH Python remote to work for Python 3.x?

@leland.curtis unfortunately any Python running in Rhino or GH is limited to 2.7 because of IronPython. See this comment on Food4Rhino.


Other options include Rhino Inside CPython (needs Rhino 7 WIP) and Rhino3dm (limited capabilities) , possibly combined with rhino compute for the good stuff


1 Like

Awesome! Thank you :slight_smile: