-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KLayout macOS 29.7 Infinite window launch #1884
Comments
I don't think this is a KLayout bug, so this may not be the right place to raise this question. What exactly did you install? Specifically, from where and which version? Matthias |
I installed it using the DMG image from the website, and the SKY130 PDK is from the regular open_pdk repository. I added the SKY130 PDK using the technology package manager. Then I installed GDSFactory because the SKY130 library requires it for the PCells. However, to install GDSFactory, I used start-console.py since the Python version KLayout is using is different from the default version. After the installation, when I run the SKY130 scripts, it just keeps launching KLayout windows. I am posting here because the same setup on my Linux machine doesn't produce this error, so I thought it could be related to KLayout. Refik |
Hello, Important Please provide more info on your Mac, including the OS name and DMG you installed. I'm a complete novice to the On Linux Mint 20.31. Install Open-PDKs
So I installed
Important Is the above version OK?
Because I'm using the source-code-build Python 3.12.7+.
3. Install GDSFactory 8.12.0
Important How do I integrate the Open-PDKs scripts into the virtual environment? To be continued... |
Cont. I successfully cloned the five repositories below using
Should I just create symbolic links to these directories from Note My KLayout 0.29.7 (source-code-build) on Linux uses I have rebuilt KLayout 0.29.7 with
|
Hello, if you have installed the klayout on Mac can you try adding the sky130 library on the open_pdk. You can either build it form open_pdks or install quickly with efabless Volare. The existing packages on klayout are working on me as well but they are not complete, missing instances. Or you can try to just install gf180 from package manager on klayout as well. I had the same issue with gf180. |
Hello @Revenantx86, As seen above, I have resolved the package installation problem on Linux.
I believe my Linux setup is equivalent to yours.
The next step is to know your operation sequence on Linux, which
From this description, I assume you are using one of
Please specify which scripts you ran. Regards, |
Hi @Revenantx86, before going too deep into debugging, you should try boiling down the problem. My preferred way is use a fresh isolated environment. For Python that is a new virtual environment, for KLayout that is a new KLAYOUT_HOME. First you need to identify the Python version you're using with the DMG. Under Linux that is always the system Python, under Mac there are different options. I am assuming you are using system Python. To create a virtual environment I use:
If you a using a non-system Python with KLayout, replace "python3" by that Python interpreter. Now you can install GDSFactory there. As you suggest, I am going to install "gf180mcu" which in the current 0.0.4 version is not compatible with GDSFactory 8. Hence I use version 7.27.1 which is the latest one of the 7 series:
To convince KLayout to use the virtual environment you need to point it to the virtual environment. First, you need to disable the system environment which the Python interpreter embedded into KLayout loads automatically. You can do so by setting We also need to copy the Python search path into So, inside the virtual environment do:
To use a fresh KLayout environment, you can use a new folder for KLAYOUT_HOME. For example:
If you start KLayout now from the command line, you should see a blank environment. No packages loaded. You can now install "gf180mcu" from the package manager in version 0.0.4. Exit KLayout and restart. Now GDSFactory will complete it's installation by adding some more packages. Make sure you do all of that from the virtual environment. I am now able to draw layouts with KLayout using the GF180 device primitives. There is no effect of windows popping up on Linux. So far that is consistent. Maybe you can repeat the same steps on MacOS to see if that recipe allows reproducing the problem. Matthias |
Linux Mint 20.3Hello @klayoutmatthias, Thank you for the instructions. 1. Create a virtual environment
2. Install "gdsfactory"
3. Use a fresh KLayout environment
4. Install "gf180mcu" from the package manager in version 0.0.4 5. Draw layouts with KLayout using the GF180 device primitives I have confirmed that multi-window popups do not occur on Linux in this case. Best regards, |
macOS Sonoma with LW-klayout-0.29.7-macOS-Sonoma-1-qt6Brew-Rhb33Phb312.dmg0. Install the DMG 1. Create a virtual environment
2. Install "gdsfactory"
3. Use a fresh KLayout environment
4. Install "gf180mcu" from the package manager in version 0.0.4 5. Draw layouts with KLayout using the GF180 device primitives
6. Re-install "gdsfactory==7.27.1" and restart the fresh KLayout
7. Re-install "gdsfactory(==8.13.3)" and restart the fresh KLayout
gh-1884-LW-phb312.mp4Best regards, |
@Kazzz-S From what I understood when the klayout is first opened automatically runs the script but the script launches another klayout which runs the script again, and eventually causing this. Im still trying to figure out the exact code that causes this. |
Hi @Kazzz-S Thanks for the analysis! From what I see there is not much inside that file:
The only thing which is kind of suspicious is the "pip install" call. Could you try commenting it out, like this:
I even think that is a general problem as gf180mcu is pinned to an older version of gdsfactory. Does the problem occur again if you set "autorun" back to "true"? If not, I must conclude that "pip install gdsfactory --upgrade" does some strange things which in the end call KLayout on MacOS only. Best regards, Matthias |
I should add that for some reason gf180mcu needs an older version of gdsfactory. I assume their API evolved in an incompatible way. So you need to install 7.27.1 to run gf180mcu. The best I guess was to update gf180mcu to support gdsfactory 8 (and later) too. Matthias |
Hello @klayoutmatthias, (3) I ran the macro manually in the IDE to make the "gf180mcu" library available. (4) I closed the second KLayout to proceed. Then, the "gf180mcu" library is ready. [IDE Console]
I'll investigate more. Direct import in Homebrew[Added: 2024-10-19] |
Cont. I started KLayout by
I think Best regards, |
Hello,
I have recently installed klayout on my Mac and added sky130 libraries to do some layout.
However, when I launch the klayout after adding the library, klayout won't stop launching new window and eventually crashing my laptop. Is there a way to fix this issue. I believe the issue is from the pcells script that running with python and its just keeps lauching new klayout window. I have installed all libraries required.
Thanks
The text was updated successfully, but these errors were encountered: