It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
Has someone experience with building klayout inside a conda environment?
I am trying to build it on a Linux redhat 7 system with python 3.8.1 and qt5 but was not successful. Maybe someone can share a requirement list which works for him/her?
I tried different package combination which end up with different compiling issues. Maybe it is not possible to build it inside a conda environment?
Best regards
Comments
Could you be a bit more specific? Like indicating what errors you encounter.
kazzz is using the Anaconda environment to generate builds on MacOS and I did so experimentally on Windows with MSVC 2017, so basically it should work. I have no experience however on RedHat 7. On Linux I still prefer the system package approach. My experience with external package managers on Linux wasn't always encouraging.
For CentOS 7 I am providing RPM's, so maybe you can simply use those.
Matthias
As Matthias mentioned above, I could successfully build KLayout from its source using Anaconda3 on macOS(Catalina, Big Sur, Monterey) and Linux Mint 19.
Please refer to the following for the more detailed environments.
I hope this info helps you.
Kazzz-S
==========================================================================================================
Hello, I am new to Klayout on Mac and I am facing some issues on the installation too! I have downloaded the anaconda package and I have followed the instructions specified in the readme file.

However, when launching Klayout I encounter the problem in the picture attached.
can someone help me solving it?
Hi,
Please provide some more information.
The name of the package you installed, for example,
LW-klayout-0.27.13-macOS-Monterey-1-qt5Ana3-Rana3Pana3.dmg
The name of your macOS (version) and outputs of the
uname -a
command, for example,Monterey (12.6.2)
$HOME/opt/anaconda3/
Thanks,
Kazzz-S
Hi,
I conducted an experiment based on three assumptions.
Then, I got the same error as you.

Then, KLayout starts normally as below.


I initially installed Anaconda3 on a Monterey virtual machine.
At that time, the Python version was 3.9.x. Then, when I added Ruby by
conda install ruby
,the conda tool resolved the dependency and downgraded Python to 3.8.x.
After that, I upgrade the Monterey OS to Ventura OS.
If assumption (3) is correct, you need to downgrade the Python version to 3.8.x to use this particular DMG package.
Or you need to build KLayout from the source.
If you inform the output of the
conda list | grep -E '(python|ruby)'
command like:I can guide you on how to do it.
Regards,
Kazzz-S
Hello @filmartinelli,
Here are the second experiment results.
I have installed the latest Anaconda3 package to a Ventura virtual machine afresh.
The detailed steps I followed are captured in the attached ZIP file.
My above assumption (3) seems correct as below.
In the latest Anaconda3, Python 3.9.15 and Ruby 3.1.2 can coexist; you have not made mistakes.
:
Step-9: Final version check
Step-10: Check the library version
When KLayout starts...

So, as I mentioned above, there are two expected options:
(1) Forcibly downgrade the Python version to 3.8.x.
(2) Build KLayout from the source with the correct/latest Python and Ruby version combinations.
I'm going to do (2).
The 3rd option shown below is risky, and I do not recommend it, however, ...
(3) !!! WARNING !!! Risky Test: Fake the library version
Kazzz-S
Hello @filmartinelli,
A happy new year, 2023.
I have built a new DMG for the Anaconda3 environment below on my Ventura virtual machine.
[Edit] This package can run in not only Ventura but also Monterey, Big Sur, and Catalina, having the same Anaconda3 setup.
Please note that the Dropbox link is temporal; I will delete it after a few weeks.
I hope this DMG will do for you.
Kazzz-S
Hi Kazzz,
I am not a mac user but I could go a few step further with my initial issue by your posts.
I used following conda environment:
And following build command:
build.sh -j16 -python ~/.conda/envs/klayoutenv/bin/python3.9 -pyinc ~/.conda/envs/klayoutenv/include/python3.9 -pylib ~/.conda/envs/klayoutenv/lib/libpython3.9.so
The dry-run is successful but I cannot finish the compiling.
It crash with following errors:
Do you have a clue why this happens? Or anybody else?
Thanks and regards
Grandement
Hi @Grandement,
The build messages show that "libGL.[so|a]" is not found when making
libklayout_tl.so
.Have you installed it?
My current Anaconda3 environment in Linux Mint 19 is not up to date and is slightly different from my first comment.

More precisely, I have switched from Anaconda3's Ruby to the OS-bundled one, as shown below.
With this configuration, so far, I could build four generations of KLayout, namely KLayout 0.27.12, 0.27.13, 0.28.0,
and 0.28.2 (the latest).
Now, let's observe the dependency of
libklayout_tl.so
.As you see below,
libGL.so.1
under the system's library directory is dynamically linked.In other words, it is not a part of Anaconda3 and should be installed separately.
Next, hmmm, how did I install it? I do not remember. Let's use the


Synaptic
package manager tool to find it.As shown in the image below,
libklayout_tl.so
was installed as a part oflibgl1
package in the case of Linux Mint 19.My suggestion is to follow similar steps.
Kazzz-S
Hi @Grandement,
Recently, I upgraded the Anaconda3 environment in Linux (Mint-19) and encountered the same problem as you:
cannot find -lGL: No such file or directory.
I've prepared a PowerPoint document to summarize the experiment results I have conducted so far.

The document does not provide a direct solution to your problem. However, I hope it will help you to some extent.
The attached Zip files are also embedded in the PowerPoint document.
Kazzz-S
I don't know from "conda" but I've encountered problems with
applications "built inside environment", then having serious
limitations. In my case it was "snap" installations, which carry
a constraint (aka "sandbox") about what the app will and won't
see. "For your protection". Only nobody tells you.
For example, Ubuntu by default installs LibreOffice and TheGimp
by "snap". I only discovered this because neither would navigate
to my /projects directory which was mounted at install on a separate
physical disk. Base apps like File Manager and shell are fine. It's
all about that "environment" and its built in baggage.
Took me an evening to ream out all "snap" apps and functionality
but now my office and graphics apps (reinstalled by apt from
better sources) are fine.
Using scenario B's



ana3B-2.sh
wrapper Bash script, I was able to successfully build the latest version 0.28.5 in the latest Anaconda3 environment on Linux Mint 19.Dependency on Anaconda3 is as follows.

Kazzz-S