Hi, I am trying to draw the primitives like mosfet...
# ieee-sscs-dc-24
k
Hi, I am trying to draw the primitives like mosfets as described in the google colab notebook, locally on my PC. But when I run the python script it says
ModuleNotFoundError: No module named 'glayout.flow.primitives'
but if no such module exists how is it able to work in the google colab notebook? I have attached screenshots of the section of the notebook I am referring to and the local code I am using (NOTE : I am using klayout + klive to view the layout, so I assume when I use the .show() method for the component it will show me the layout in the klayout window) can anyone please help me with fixing this error?
s
can you try pip uninstall glayout
then pip install glayout
Make sure you commit your container after you uninstall and reinstall
k
@Sakib Pathen Do I have to execute the pip uninstall glayout and pip install glayout commands inside the container? i.e. from a terminal where the container is running? Also how do I commit the container? could you please tell me what command to execute to do so?
s
yeah
list the containers with
Copy code
sudo docker ps -a
Copy the id of the container that you installed the packages on, then
Copy code
sudo docker commit <container ID> <image name or openfasoc:glayout>
k
@Sakib Pathen I am still getting the same error. Is it because I am saving the file in the top directory where the docker stuff is saved? i.e.
OpenFASOC-->MY_FILES-->mosfets.py
or do I have to save it at a specific location?
s
I don't think that is the issue. could you show me the of your pip uninstall and install of glayout
k
@Sakib Pathen Here are the terminal outputs of pip uninstall and install glayout. but I still get the same error
@Chetanya Goyal any idea what might be causing this? when I try to draw the primitives such as nmos locally on my pc, I get the error :
ModuleNotFoundError: No module named 'glayout.flow.primitives'
c
try
pip uninstall glayout
and then work in the
openfasoc/generators/glayout/flow/blocks
directory to create your designs, you should be able to find modules then
k
@Chetanya Goyal I tried that as @Sakib Pathen had suggested, I used first
pip uninstall glayout
and then
pip install glayout
. After which I commited the changes to the container and despite having moved the file to the
glayout/flow/blocks
folder, I still get the same error that it is unable to find the module
I can see that the folder primitives exists inside glayout i.e. there exists
fet.py
inside
glayout/flow/primitives
. I even removed the repo and the docker container and image and did a fresh install and this screenshot is from the fresh install but it still is unable to find the modules somehow
s
Sample problem! I just posted about it. I guess your code will run just fine at the same location where
test_glayout.py
is! But If we are creating this file inside `glayout/flow/blocks/<your folder>, I dont know how we can find
Copy code
from glayout.flow.pdk.gf180_mapped  import gf180_mapped_pdk  as gf180
This is indended to run from the location same as the test code
k
@Saptarshi Ghosh it seems you are facing a different issue, please start a separate thread for it; so as to keep things organised.
👍 2