Use the latest Python in Grasshopper, including libraries such as Numpy and SciPy. More info
Requirements:
- Clone this repository
- Make sure Docker is running
- Open the folder in VS Code
- Choose "Remote Containers: Open Folder in Container" (The command panel is invoked with
f1
)
With venv, pip, etc. like any other Python dev environment
- Add your functions to app.py
- Run the Server:
python app.py
, it will log something like[INFO] * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
to the console. - Add a Hops Component to your Grasshopper definitions (you may need to install it with the
Package Manager
in Rhino) - Double click the Hops Component on the Canvas. Enter the path to your function in the Pop Up. (In our example it would be
http://127.0.0.1:5000/[your function here ]
)