Conda installers available!

Experimental conda installers are now available. For instructions refer to the downloads page.

Currently not supported is :
[li]Code generation at run-time[/li]

In case you experience any issues, please post them here.


I tried today on macOS 10.15 in combination with Anaconda 2019.10
It works perfectly! I works with Spyder and PyCharm.

Just a small note, I used the following commands to add channels

conda config --add channels conda-forge conda config --add channels ngsolve conda install ngsolve

Thanks for the feedback, I fixed the commands on the download page :slight_smile:

A second thing that I just noticed:

When I want to compile my C++ Extensions, CMake can’t find the cmake files:

NetgenConfig.cmake netgen-config.cmake

I think the find_package command in the NGSolveConfig.cmake has to be updated.

mylittlengsolve builds fine on my Mac (also 10.15). Make sure you have no other NGSolve installation available. Maybe cmake is finding the wrong Netgen or NGSolve in /Applications/

In case you cannot fix the issue, post/send the CMakeCache.txt file in you build directory.

Anyway, there is still another bug: compiled python modules shall not link to libpython, as it is statically linked to the python executable in conda. This results in a segfault when loading the module. A fix in the cmake function add_ngsolve_python_module() will be released later today.


Thanks for your fast reply. The installation is complete clean, so I’m sure there is nowhere else the NGSolve and I double checked that there are not any false environment variables.

Find attached the CMakeCache.txt. To produce this I only changed the CMakeLists.txt to give the find_package function a hint to the ngsolve CMake file:

HINTS /Users/username/opt/anaconda3/pkgs/ngsolve-6.2.1909-py37_91/lib/cmake/ngsolve

So, perhaps you have set up environment variables that I don’t have?

Attachment: CMakeCache.txt

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:


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.

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.

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.

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.

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__)"


I installed tcl/tk globally in my archlinux

~$ pacman -Q tcl
tcl 8.6.10-1
~$ pacman -Q tk
tk 8.6.10-1
~$ ls /usr/lib/ 

and about netgen/ngsolve,

~$ python3 -c "import netgen;print(netgen.__file__)"
~$ python3 -c "import ngsolve;print(ngsolve.__file__)"
importing NGSolve-6.2.1909-72-g3c8f3a0d

Looks like UMFPACK is not part of the conda package. This leads to problems. For example when using the Elasticity Modeltemplate. Would it be possible to add UMFPACK?

Not sure why mhochsteger disabled umfpack, maybe there was a problem with the suitesparse dependency in conda. I will have a look into this next week or so. In the meantime, the pardiso solver should be available in the conda installer and should work instead of umpfack.

Thanks a lot for the quick reply and fantastic tools! My Problem with the missing UMFPack is that I am using the Elastic Templates, specifically I am looking at the example modeltemplates/ at master · NGSolve/modeltemplates · GitHub .

So I am working on a quite high level.

You can get Elasticity to work without the UMFPack, if you use HookeMaterial and set nonlinear to False. But otherwise initiating the class will fail and I do not really see how I would change to the paradiso solver.

Anyways I have succeeded to compile the code from scratch within my docker setup so the issue is not pressing. Just wanted to let you know…


I used the following lines to install ngsolve via the Conda installer in my local cluster:

module load conda
conda create --prefix ~/NGSolve
source activate ~/NGSolve
conda config --add channels conda-forge
conda config --add channels ngsolve
conda install ngsolve

The installation was successful, everything is local in my folder ~/NGSolve
However, the gui is not working properly, it only pops up a window without any information. See attached photo. from 2020-01-14 15-55-55.png


Hello again, please discard the previous message, after run

python3 -c "import netgen; print(netgen.__file__)"

I realized that it is pointing to an older build from source without GUI.

After a correct environment setup, everything seems working up to now. In particular, the umfpack and pardiso solver are all working nicely.

Thanks again for all your effort to make easier the installation!!!

Does it work with Windows 10 as well? I’ve been trying to set up NGSGUI on Spyder but it’s not working. Jupyter is working fine

it should be. What problems do you run into?