Error in installation: zsh: illegal hardware instruction netgen

I am trying to install on my M1 Macbook Pro and I get this error message when I try to run “netgen”.
I just installed ngsolve through “pip3 install ngsolve”, the download was successful, but I could not run anything.

I asked a friend to replicate it on his machine (also a M1 Macbook Pro) and he has the same error message.

Can anyone please help? :slight_smile:

1 Like

Make sure to follow all the steps in this site :
If you have any problems then, feel free to ask

Thank you for your reply.

Both my colleague and I followed the instructions from the website. We used pip to install ngsolve, but when trying to load the geometry as suggested to verify the installation, we get the error:

zsh: illegal hardware instruction netgen

Do you have any idea why?

Yes, don’t use pip to install ngsolve, download it from website ( Also, type on your command “netgen” when installed, to make sure it is correctly installed

As stated in the Downloads page, the DMG bundle ONLY works on x64 machines (i.e. no M1).

The pip installer should work for both x64 and M1 machines.

In case it’s not working, please check that you do not have the dmg installed.

Thank you very much for your help.

The issue has been solved. In case other people have the same issue, here’s the reason it was not working:

I had installed my Python via brew, so the python path was set to /usr/bin/local/python3, instead of “/Library/Frameworks/Python.framework/Versions/3.11/bin”. I suggest to reinstall python through the website rather than brew.

Once again, thank you for the time taken :slight_smile: