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.

PIP installers available!

1 year 9 months ago - 1 year 9 months ago #4222 by matthiash
Dear NGSolve users,

Finally we managed to provide pip-installers for our software. This means, installing NGSolve on your computer now becomes as easy as py!
pip install ngsolve

For Linux, we also provide an ngsolve-avx2 package which is compiled using AVX2 instructions (only working on supported hardware).

Also nightly builds will be provided (use the --pre flag of pip to install prerelease versions).

Similar to the conda installers, run-time code generation is currently not supported on all platforms, but we are working on it.

The NGSolve Team
Last edit: 1 year 9 months ago by matthiash.
The following user(s) said Thank You: paul.stocker, alex.v
1 year 8 months ago #4236 by matthiash
Replied by matthiash on topic PIP installers available!
Some people reported problems starting Python after installing the ngsolve pip-package on MacOS, and after rebooting. Updating ngsolve to the NGSolve-6.2.2202 release solves the problem.
If pip is also not working (because of this problem), you can manually delete the directory /Library/Frameworks/Python.framework/Versions/3.10/Contents ( change 3.10 to your python version).

The error message you get, when having this problem looks like this:
dyld[3600]: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.10/Python
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
  Reason: tried:  '/Library/Frameworks/Python.framework/Versions/3.10/Python' (code signature invalid (errno=1) sliceOffset=0x004B0000, codeBlobOffset=0x00483BA0, codeBlobSize=0x000135F0 for 

1 year 8 months ago #4283 by alex.v
Replied by alex.v on topic PIP installers available!
I am having issues with installing it through pip on Ubuntu 21.10. It does not seem to install with umfpack, something that the apt version did.

Running the following line ```a_assembled.mat.Inverse(freedofs=freedofs, inverse="umfpack")``` works with the apt version, but crashes the pip installation.

Is this an oversight, a temporary limitation, or a permanent limitation of the pip install?

Additionally, this page  shows the default CMake options when building from source. Is there a list to show which options are enabled for the different distribution modes (pip, apt, conda, etc.) of NGSolve?
1 year 7 months ago #4367 by alex.v
Replied by alex.v on topic PIP installers available!
Any update on this?
1 year 4 weeks ago - 1 year 4 weeks ago #4542 by paul.stocker
Hi everyone!
I tried the pip installer on windows with anaconda

Running the conda environement
conda create -n test python=3.9
I gave pip install ngsolve a try. The install works, even netgen opens a gui, but ngsolve cannot find ngslib.
(EDIT: I tried without conda and got the same result.)

from .ngslib import __version__, ngstd, bla, la, fem, comp, solve
ImportError: DLL load failed while importing ngslib: The specified module could not be found.

I tried to add everything to PATH and PYTHONPATH by hand without success. I uploaded the output of conda info --system here

I also tried
conda install -c ngsolve ngsolve
but could not find a python version that would satisfy the specifications. I tried python3.9 giving
 - ngsolve -> python[version='>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
so I tried python3.7 telling me
 - ngsolve -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.10,<3.11.0a0|>=3.9,<3.10.0a0']

Any hints to get this working?

Last edit: 1 year 4 weeks ago by paul.stocker.
1 year 2 weeks ago #4557 by maurosgroi
Dear Developers,
I am facing the very same problems described by  paul.stocker .
Which version of Anaconda should we use?
Is there a workaround to solve the problem?
Thanks a lot and best regards,
Mauro Sgroi.
Time to create page: 0.131 seconds