Does anyone know how to access <#C016UL7AQ73|> pd...
# sky130
a
Does anyone know how to access #C016UL7AQ73 pdks in klayout? I have configured it, but can't access the library in the editor option.
l
Hi @Abhay Kulkarni have you updated gdsfactory to the latest version as we discussed?
a
Hi Leo. Yes I did actually. I went here and installed complete gdsfactory mentioned there by putting in terminal this: "pip install "gdsfactory[full]" --upgrade"
I am still getting this issue.
l
Alright, can you tell me which gdsfactory version you have installed now? This should be the latest version:
Copy code
$ pip3 show gdsfactory
Name: gdsfactory
Version: 8.15.0
The same for kfactory, which is a dependency of gdsfactory.
Copy code
$ pip3 show kfactory
Name: kfactory
Version: 0.21.5
a
command: pip3 show gdsfactory Name: gdsfactory Version: 8.15.0 Summary: python library to generate GDS layouts Home-page: Author: Author-email: gdsfactory community <contact@gdsfactory.com> License: Location: /home/abhay/.local/lib/python3.10/site-packages Requires: attrs, freetype-py, ipykernel, jinja2, kfactory, loguru, mapbox_earcut, matplotlib, networkx, numpy, orjson, pandas, pydantic, pydantic-extra-types, pydantic-settings, pyyaml, qrcode, rectpack, rich, scikit-image, scipy, shapely, toolz, trimesh, typer, types-PyYAML, watchdog Required-by: gplugins
Command: pip3 show kfactory Name: kfactory Version: 0.21.5 Summary: KLayout API implementation of gdsfactory Home-page: Author: Author-email: gdsfactory community <contact@gdsfactory.com> License: Location: /home/abhay/.local/lib/python3.10/site-packages Requires: aenum, cachetools, gitpython, klayout, loguru, pydantic, pydantic-settings, rectangle-packer, requests, ruamel.yaml.string, scipy, tomli, toolz, typer Required-by: gdsfactory
l
I'm a bit at a loss here, the versions match up and it should just work... If you start a Python, are you able to import kfactory? What is the path to it?
Copy code
$ python3
Python 3.12.6 (main, Sep  7 2024, 14:20:15) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import kfactory
>>> print(kfactory.__file__)
/home/leo/.local/lib/python3.12/site-packages/kfactory/__init__.py
a
oh it says, No Module named kfactory. So looks like it has not got installed or configured.
when i go for 'import gdsfactory' , it gives me exact same error as it is mentioned in the image. (that is incompatibilty of gdsfact and python).
l
Okay, that is a starting point. What version of Python are you using?
a
I had python 3.8.10 . But then I installed python3.10 also seperately which for some reason doesn't show when i do 'python3 -V'
r
might be that you have the libraries installed but only for the other version of python. If you want to make sure you install something for a specific python version run
python3.10 -m pip install ...
a
Output of that : Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/usr/lib/python3/dist-packages/pip/__main__.py", line 19, in <module> sys.exit(_main()) File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 73, in main command = create_command(cmd_name, isolated=("--isolated" in cmd_args)) File "/usr/lib/python3/dist-packages/pip/_internal/commands/__init__.py", line 96, in create_command module = importlib.import_module(module_path) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 24, in <module> from pip._internal.cli.req_command import RequirementCommand File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 15, in <module> from pip._internal.index.package_finder import PackageFinder File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 21, in <module> from pip._internal.index.collector import parse_links File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 12, in <module> from pip._vendor import html5lib, requests ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
I have Ubuntu 20.4 if that matters. Also, my terminal had got stuck while adding ppa repository from deadsnake. So, would like to avoid that now.
while trying to install python3.10, it gave me this: Reading package lists... Done Building dependency tree Reading state information... Done python3.10 is already the newest version (3.10.15-1+focal1).
l
A different way to run KLayout with gdsfactory is by using Nix. Efabless has the nix-eda repository with a collection of tools. https://github.com/efabless/nix-eda You simply need to install Nix (you can follow the OpenLane 2 documentation: https://openlane2.readthedocs.io/en/latest/getting_started/common/nix_installation/index.html) and after that you can run:
Copy code
nix run github:efabless/nix-eda#klayout-gdsfactory
to open KLayout with gdsfactory installed. Maybe this works for you.
a
Thanks a lot dude !! I will try it out and let you know.
πŸ‘ 1
Hi @Leo Moser it worked ! I was just wondering if that was all in the library. I couldn't find nmos18 or more libraries like that. I assume it comes with limited pdks. Thanks for your constant help though! :)
l
That's great to hear! πŸ˜ƒ I don't quite get your second point. Are you missing any transistor types? Using the
type
parameter you can select a different one. If you have any issues with the PCells, please open an issue here: https://github.com/efabless/sky130_klayout_pdk Cheers!
πŸ‘ 1
a
Hi !! Yes, I think I missed the drop down menu ! πŸ˜„ . I am good to go now! thanks for your support and best wishes. Keep in touch for any more discussions !
πŸŽ‰ 1