I have installed NGSolve on a Mac using pip and all is working well. But I would like to use ngs-special-functions
I got the code from GitHub but it would not compile (which makes sense since I have no build folders for NGSolve). Is there any way to get access to special functions when NGSolve is installed via pip? I want to use Hankel functions in a scattering code.
it should work with the pip installer. It installs the ngsolve header files as well.
Make sure to rerun cmake after re-installung ngsolve, or updating the xcode compiler.
It’s possible to get it running with the pip version, you just need to point CMake to the right directories.
To find out, where netgen/ngsolve is installed, run
In my case, that’s /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/ngsolve/__init__.py
Now take the directory above and add ‘cmake’, this is where CMake finds the build configuration (same applies for netgen).
The final build call looks like this:
I worked on this some more and I see the header files that cmake is looking for in/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ngsolve/cmake/NGSolveConfig.cmake
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/netgen/cmake
so I tried
export CMAKE_PREFIX_PATH=“/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages:/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/netgen:${CMAKE_PREFIX_PATH}”
cmake …
make -j4
make ran OK but I got this error message from make
make -j4
[ 4%] Performing update step for ‘project_f2c’
[ 8%] No patch step for ‘project_f2c’
[ 12%] Performing configure step for ‘project_f2c’