Problems with Netgen pip package

Hello,

The Python packages are compiled for AVX2 CPUs. If the machine is too old (about 10 years), they might not support it. In this case, they need to compile Netgen from source.

Answer to your remarks:
Are you sure your instructions are correct? There is no ./pip inside virtual_env when I run python3 -m venv virtual_env, but bin, include, lib, ... instead.

This works for me in a clean docker environment:

docker run -ti python:3.11 /bin/bash
cd
python -m venv virtual_env
./virtual_env/bin/pip install netgen-mesher
./virtual_env/bin/python -c 'import netgen'

The ldd command shows unresolved libs, because the netgen library cannot know at compile time, where the OCC libs will be at run-time. Thus, we are loading them explicitly during python import, see netgen/python/__init__.py at master · NGSolve/netgen · GitHub

Best,
Matthias