heitzmann / gdspy

Python module for creating GDSII stream files, usually CAD layouts.
Boost Software License 1.0
352 stars 128 forks source link

Use gdspy in Klayout Macro developement (reopened) #226

Open atofini opened 1 year ago

atofini commented 1 year ago

Reopening the issue #139

Can you elaborate how the pre-compiled binary can be ran in KLayout? I get a circular import error when I use it.

Error code: cannot import name 'clipper' from partially initialized module 'gdspy' (most likely due to a circular import) (C:\Users\Alex.tofini\AppData\Roaming\KLayout\lib\python3.8\site-packages\gdspy__init__.py) C:\Users\Alex.tofini\AppData\Roaming\KLayout\lib\python3.8\site-packages\gdspy\polygon.py:39

heitzmann commented 1 year ago

I don't use Windows, so I can't tell exactly what to do, but you have to use the whl installers from the releases and install them using the python path from Klayout (I believe it ships with its own python on Windows).