1- Introduction

In this lesson, we want to show how to start coding Python inside grasshopper by using the Python script component. In this lesson, we want to show you how can write a simple code inside Python and also learn how to import library components of grasshopper to make things easier!

PH Newsletter

Free Weekly Scripts

Join our exclusive email newsletter and be the first to receive our free, useful Grasshopper scripts every week!


  • AlbertoMargo

    Do we have to load some phyton library to grasshopper or something?
    I’m having some errors: “Solution Excepction: Method Not Found”

  • erfanrezaei_

    Hi Alberto
    you just need to use this code at first in your python editor to load grasshopper components:
    import ghpython.library.components as gh

  • chuachinghong

    Thanks for the video. Just curious…if let’s say we have two solutions to a problem. Say one was done with the visual programming (wired) way and another was done with python script. Will there be a cpu computational time advantage for python?

    • naseri2

      You’re welcome. Scripts are faster for the most part. For instance, you might have a routine that you do often which uses 10 components, you can cluster that into one component (but it is usually slower) or you can script the routine as one component and it can be very fast. But if you replace one component with a python script, then it will be similar in speed.

  • spaced2009

    hi i can’t seem to dowlaod the video, can anyone help me? thanks!!

    • parametric

      Hi Spaced2009

      Thank you for the report. Please check the link again