MacOS: Installation: "Frameworks" path missing at NGSolve-6.2.1804.dmg?

More
6 years 5 months ago #542 by charge
Hi everybody,
I tried to install Netgen on my MacOS by downloading NGSolve-6.2.1804.dmg. I dragged and dropped this file to my Applications folder and then added the following commands to my .bash_profile:

#netgen path variables
export PYTHONPATH=$PYTHONPATH:/Applications/Netgen.app/Contents/Resources/li b/python3.6/site-packages:.
export NETGENDIR=/Applications/Netgen.app/Contents/MacOS
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$NETGENDIR
export DYLD_FRAMEWORK_PATH=$DYLD_FRAMEWORK_PATH:$NETGENDIR/../Frameworks
export PATH=$NETGENDIR:$PATH

However when trying to start "netgen" in the command line, I get the following error message:

dyld: Library not loaded: @executable_path/../Frameworks/Python.framework/Versions/3.6/Python
Referenced from: /Applications/Netgen.app/Contents/MacOS/netgen
Reason: image not found
Abort trap: 6

Then I noticed that there is no folder "Frameworks":

$ cd $NETGENDIR/..
$ pwd
/Applications/Netgen.app/Contents
$ ls
Info.plist MacOS Resources

Am I doing something completely wrong or is there a problem with the "NGSolve-6.2.1804.dmg" installation file?

Thanks in advance and best regards
More
6 years 5 months ago #543 by joachim
Hi,

it does not find Python. Are you sure you have Python 3.6 installed ?

Do you have the file
/Library/Frameworks/Python.framework/Versions/3.6/Python

Since now all frameworks we use are standard, we don't have any framework inside the Netgen app.

Joachim
More
6 years 5 months ago #544 by charge
Hi Joachim,
Thank you for your quick reply!

I have Python 3.6 installed, but through Anaconda which does not install Python with a framework build: groups.google.com/a/continuum.io/forum/#...anaconda/1rX3A1Noi9Q

Is there any workaround to also let netgen work with the python version from anaconda?

Thanks,
Christoph
More
6 years 5 months ago #545 by charge
Hi Joachim,
I got a step further. I linked the anaconda library libpython3.6m.dylib against the framework library requested:

sudo ln -s /anaconda3/lib/libpython3.6m.dylib ./Python

Now I can successfully start "netgen". However, when I try to import netgen or ngsolve to python3, it always crashes:

Python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ngsolve import *
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

Do you might have another advice concerning this error?

Thanks and best regards,

Christoph
More
6 years 5 months ago #546 by charge
PS: sudo ln -s /anaconda3/lib/libpython3.6m.dylib ./Python

was executed in

/Library/Frameworks/Python.framework/Versions/3.6

So effectively the command was:

sudo ln -s /anaconda3/lib/libpython3.6m.dylib /Library/Frameworks/Python.framework/Versions/3.6/Python
Time to create page: 0.104 seconds