I use the macOS Mojave (10.14.5) system, and install the Anaconda.
Then I install the Fenics by conda create -n fenicsproject -c conda-forge fenics.
Finally, I install the Fenics successfully.
And I do source activate fenicsproject, then in the Python 3.7.3 environment, when I call from fenics import *, I get the following errors:
(fenicsproject) MacBookPro:~ xxx$ python
Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 14:38:56)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fenics import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Applications/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/fenics/__init__.py", line 7, in <module>
from dolfin import *
File "/Applications/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/__init__.py", line 34, in <module>
from .cpp import __version__
ImportError: dlopen(/Applications/anaconda3/envs/fenicsproject/lib/python3.7/site-packages/dolfin/cpp.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libdmumps-5.1.2.dylib
Referenced from: /Applications/anaconda3/envs/fenicsproject/lib/libpetsc.3.11.dylib
Reason: image not found
and if you also want spyder and jupyter, then I had to reset spyder (the first time I opened spyder it crashed and said that I have to reset it. Then it worked). For jupyter I also had to install nb_conda:
conda install nb_conda
Hope this works for you.
edit: I also tried to launch Anaconda, changed the environment there and selected Spyder, this did not work for me. Uninstalled everything and installed miniconda
Removed from fenics import * , use from dolfin import *
This change was reverted since it was too disruptive. You can see in yoczhang’s output that fenics import calls dolfin import. The problem seems to be the mumps library. @yoczhang, check your installation of mumps 5.1.2.