Forum Message



We have moved the forum to . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.


The forum is in read only mode.

Conda installers available!

3 years 9 months ago #2175 by matthiash
I'm not (yet) a conda expert, but I think your given hint is wrong. That's the path to the uninstalled package.
For me a hint is not necessary, conda sets PATH appropriately such that cmake finds Netgen/NGSolve automatically:
Netgen_DIR:PATH=/home/mhochsteger/miniconda3/envs/ngs/lib/cmake/netgen NGSolve_DIR:PATH=/home/mhochsteger/miniconda3/envs/ngs/lib/cmake/ngsolve
3 years 9 months ago - 3 years 9 months ago #2176 by creativeworker
Ok, i see it has something to do with the path variables.
FYI: I created an own conda environment for the NGSolve installation. Activating it in the shell gives the possibility to open netgen just by typing netgen to the terminal. That works.

But I can't find any Path variables as you showed in the post? The second thing is then to apply those environment variables of the conda environment to CLion, where cmake is started.

For curiosity I installed netgen via the classical way. Then the C++ Extension compiles as expected, but of course installs into the 'old' structure, which is then not used with the conda package (of course as expected).

P.S.: The update of netgen and ngsolve with conda worked flawless.
Last edit: 3 years 9 months ago by creativeworker.
3 years 9 months ago - 3 years 9 months ago #2179 by christopher
Did you have the conda environment activated when you ran the cmake configure?
I think this is the problem because you configure in clion. Maybe it is already enough to run clion in the venv. If not maybe run the cmake command by hand in the venv.
If you don't have it activated it won't find it, if you have it activated it should correctly install it into the virtual env as well.
Last edit: 3 years 9 months ago by christopher.
3 years 9 months ago #2180 by christopher
Btw you will most likely have to install the conda package pybind11 as well if you want to compile an ngsolve extension in a conda env.
3 years 9 months ago #2195 by liubenyuan
Hi, thanks for the ngsolve conda cloud.

However, it seems like or some dynamic libraries are not properly installed. For example,
import netgen.gui from ngsolve import * ERROR:root:Cannot activate multiple GUI eventloops optfile ./ng.opt does not exist - using default values togl-version : 2 OCC module loaded loading ngsolve library cannot load ngsolve error: couldn't load file "": cannot open shared object file: No such file or directory is placed at /usr/share/miniconda3/pkgs/ngsolve-6.2.1909-py37_91/lib/netgen Maybe we should add an script telling its location whenever we reinstalled a new version of ngsolve.
3 years 9 months ago - 3 years 9 months ago #2200 by matthiash
Thanks for the report. We are currently working on an issue that is probably related to yours. A workaround is to set the LD_PRELOAD environment variable to the tcl library. In my case it's working by starting python like this:
LD_PRELOAD=/home/mhochsteger/miniconda3/lib/ python3

Anyway I would like to check the directory structure of your installation. Pleases post the output of following commands:
python3 -c "import netgen;print(netgen.__file__)"
python3 -c "import ngsolve;print(ngsolve.__file__)"

Last edit: 3 years 9 months ago by matthiash.
Time to create page: 0.150 seconds