Conda installers available!

I’m facing problem with ipykernel versions. For running spyder, it requires the ipynernel version to be 5 and up and for running jupyter, it requires ipykernel version to be 4.10

Afaik ipykernel >= 5.2 has fixed the problem if you are not a windows user. For windows users I’m not sure…
If you remove the dependency from the setup.py and install it is there a problem?

Best
Christopher

Hi, I am trying the conda package with python 3.7 under MacOS. However, the install of the jupyter extension and any other import of ngsolve fails:

File “/Users/bittrich/opt/anaconda3/envs/ngsolve/lib/python3.7/site-packages/ngsolve/init.py”, line 13, in
from .ngslib import version, ngstd, bla, la, fem, comp, solve
ImportError: dlopen(/Users/bittrich/opt/anaconda3/envs/ngsolve/lib/python3.7/site-packages/ngsolve/ngslib.so, 2): Library not loaded: @rpath/libstlvis.dylib
Referenced from: /Users/bittrich/opt/anaconda3/envs/ngsolve/lib/python3.7/site-packages/ngsolve/ngslib.so
Reason: image not found

Somehow libstlvis.dylib is missing. It is nowhere to be found so it is not just an issue of the relative path linking.

Hi,

libstlvis.dylib is part of netgen, which exact versions of netgen and ngsolve do you have installed?
Please post the output of

conda list | grep “netgen|ngsolve”

Best,
Matthias

Hi Matthias, thanks for the fast reply! This is the output:

netgen 6.2.2004 py37h9ffcb49_1 conda-forge
ngsolve 6.2.2004 py37_6 ngsolve

so basically this a bug report for netgen? However, I checked all the environment for the library and got no result, so the library is not just missing in the ngsolve directories but also in netgen.

Best regard,
Lars

Hi Lars,

The netgen package in conda-forge is not maintained by us and is built without GUI support, hence the missing vis libraries.
You need to install netgen from the ngsolve channel as well.

Best,
Matthias

Hi Mattias,

That is interesting. It pulled in netgen from conda-forge automatically. I checked my .condarc and the ngsolve channel was first. But even the “conda install -c ngsolve netgen” was pulling it from conda-forge. I fixed it with “conda config --set channel_priority strict”. Then I got it from the ngsolve channel but after installing ngsolve again in downgraded to 6.2.1910. With “conda update --all” I got it back to " 6.2.2004" but then the packages “six” and “openblas” were missing → so installing that “conda install six openblas” it is now working fine.

Thank you!
Lars

Hi Lars,
Maybe you already had netgen installed by installing freecad or so? Then I guess conda doesn’t upgrade to the ngsolve channel version automatically. An option to try then is to install ngsolve in a dedicated environment.
Best

Hi Christopher,
Actually that is exactly what I did! My problem was solved now, but in case someone else encounters the same problem I described my solution anyways. I just verified again:
conda create --name ngsolve_test python=3.7
conda activate ngsolve_test
conda config --add channels conda-forge
conda config --add channels ngsolve
conda install ngsolve

results in the following package list:

netgen conda-forge/osx-64::netgen-6.2.2004-py37h9ffcb49_1
nettle conda-forge/osx-64::nettle-3.4.1-h3efe00b_1002
ngsolve ngsolve/osx-64::ngsolve-6.2.2004-py37_6

only with:

conda config --set channel_priority strict

I get:


netgen ngsolve/osx-64::netgen-6.2.1910-py37_44
ngsolve ngsolve/osx-64::ngsolve-6.2.1910-py37_28

again. However all the channel priorities and channel lists entries are global to all environments so using this instead might be more useful:

conda config --env --add channels conda-forge ngsolve

Best,
Lars

conda install -c ngsolve ngsolve

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==11.0=0

Your installed CUDA driver is: 11.0

Does NGSolve even need CUDA? I am surprised to see this conflict.

I did get the same thing on windows with a different CUDA version but only when I forgot to add the coda-forge channel. Ngsolve has a lot of dependencies that can only be matched in this channel so the short version of supplying only the ngsolve channel in the install command does not work.

So if you setup a new environment just do (strict priority might not be needed under windows):

conda config --env --add channels conda-forge
conda config --env --add channels ngsolve
conda config --env --set channel_priority strict
conda install ngsolve

Best,
Lars

Thanks! I used you way, and I could install the package. However, when I run from ngsolve import *, I got DLL load failed: The specified procedure could not be found.

I gave up, and used .msi to install on windows. It worked now.

Im getting this same error, did you ever work it out?

Hi there, I am trying to install Netgen on my MacBook. I tried the DMG file but ran into an error with it not finding python etc. I now tried the anaconda approach and the install produces pages and pages of errors with “conflicts”… Here is some of the terminal code/output. I have installed the latest anaconda distribution.

~ % conda install ngsolve
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for pyls-black pylint astroid black typed-ast anaconda: : 349it [1:08:54, 2Examining conflict for pyls-black pylint astroid black typed-ast anaconda: : 350it [1:08:54, 3Examining conflict for pyls-black prometheus_client black scikit-image anaconda appdirs: : 350iExamining conflict for pyls-black prometheus_client black scikit-image anaconda appdirs: : 351iExamining conflict for scikit-image anaconda networkx: : 351it [1:09:05, 3.57s/it] failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications: (pages of errors available if you’d like to see them)


Any advice you have would be greatly appreciated.

Thank you,
Sarah

Issue Resolved by upgrading my Ubuntu version.
Hello Matthias,

I have been using Netgen/NGSolve on 64-bit Ubuntu 16.04 LTS for the past 6 months. I installed it using Conda.
Only recently have I encountered the following error
NameError: name ‘dx’ is not defined

with codes involving dx.
I followed the advice on: Can not run navierstokes.py example
( Can not run navierstokes.py example - Kunena )
but in vain.
More info on my install:

packages in environment at /home/nssharma/anaconda2/envs/ngsolve_test:

netgen 6.2.2006 py37he358ceb_3 conda-forge
ngsolve 6.2.2006.post48 py37_0 ngsolve

Could you please tell me what I can do to fix this NameError?

Many thanks!
Natasha

I have tried installing using the conda packages on multiple systems and when it attempt to run:

jupyter nbextension install --user --py ngsolve

i get an error similar to

FileNotFoundError: [Errno 2] No such file or directory: ‘/home/username/anaconda3/envs/ngs/lib/python3.8/site-packages/ngsolve/nbextension/static’

Can anyone provide a fix to this?

According to the documentation ( Interactive NGSolve Tutorial — NGS-Py 6.2.2302 documentation ) you need to run

pip3 install webgui_jupyter_widgets jupyter nbextension install --user --py widgetsnbextension jupyter nbextension enable --user --py widgetsnbextension jupyter nbextension install --user --py webgui_jupyter_widgets jupyter nbextension enable --user --py webgui_jupyter_widgets

Best,
Matthias

Dear all,
i have installed ngsolve as described in a new conda enviroment. Now i have the problem that when i use it in python the gui generally does not open. this means i have no visualization of my solutions. However, with Jupyter notebooks it works.
Thanks
Christian

Hello all,

i installed Netgen following the online instruction. I can run the tutorials by calling them over the command window. When i use Jupyter notebook, the gui is not opened. The script itself is working (i can see teh outputs in the Jupyter notebook). Do you hav any ideas?

Many Thanks,
Michael

Hi Michael,

Did you run the commands mentioned above?

Best,
Matthias