mac install problems

1 month 1 week ago - 1 month 1 week ago #2774 by JSR
I recently switched computers to a mac running OS 10.15.4. I have python 3.8 installed and ran the dmg installer. I can open the netgen gui and load meshes, but when I try to solve a PDE my computer can't find the ngsolve module. For example, here's the output when I try to run the poisson.py example

NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
loading ngsolve library
NGSolve-6.2.2004
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 4 thread(s)
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ngsolve'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ngsolve'
(should) load python file 'poisson.py'
Traceback (most recent call last):
File "<string>", line 1, in <module>
Traceback (most recent call last):
File "<string>", line 4, in <module>
ModuleNotFoundError: No module named 'netgen'
ModuleNotFoundError: No module named 'ngsolve'
Finished executing poisson.py

Any ideas as to what's going on?

Please Log in or Create an account to join the conversation.

1 month 1 week ago - 1 month 1 week ago #2777 by matthiash
Hi,

I guess you still need to set the environment variables correctly. This is described in the "Getting started with Netgen" section of the documentation:
ngsolve.org/docu/latest/install/gettingstarted.html#mac-os-x

EDIT: Opening Netgen from the Launchpad (and not from the command line) should work without setting environment variables as described above. This is working on my Mac (10.15.5 Beta, 6.2.2004 dmg, Python 3.8.2)
Did you have NGSolve installed before (maybe a self-compiled version)? Check if there are environment variables (like DYLD_LIBRARY_PATH etc.) pointing to another NGSolve installation

Best,
Matthias

Please Log in or Create an account to join the conversation.

1 month 1 week ago #2778 by christopher
Have you set your PYTHONPATH correctly? See here:
ngsolve.org/docu/latest/install/gettingstarted.html#mac-os-x

Please Log in or Create an account to join the conversation.

1 month 1 week ago #2779 by JSR
You're right. I thought I had my environment variables set correctly, but I hadn't noticed the getting started page is written for python 3.7. I changed the 3.7 to 3.8 and now it works. That's what I get for copy-pasting without reading, I suppose.

Thanks for the help!

Please Log in or Create an account to join the conversation.

1 month 1 week ago #2781 by matthiash
Good point, I will update the documentation.

Best,
Matthias

Please Log in or Create an account to join the conversation.

© 2019 Netgen/NGSolve