Required dependencies

Optional dependencies

  • autograd (>= 1.2): For computing gradients
  • gdspy (>= 1.5): For GDS structure export
  • scikit-image (>= 0.15): For GDS structure export via rasterization


To install the latest version of Legume from PyPi:

pip install legume-gme

Alternatively, you can git clone Legume from the Fan group GitHub, manually install all of the required dependencies, and add the path to the Legume in your python path environment variable:

git clone
export PYTHONPATH=$PYTHONPATH:/path/to/the/location/of/legume