Problem importing mshr; no module named _mshr
I've compiled FEniCS via Dorsal (didn't work to install mshr there by the way). Anyhow, installing mshr manually works fine, however when I try to import mshr into my Python script I get the following error:
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/mshr.py", line 32, in <module> _mshr = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/mshr.py", line 24, in swig_import_helper import _mshr
ImportError: No module named _mshr
I'm sure there is an easy fix.
Comments (9)
-
Account Deleted reporter -
Account Deleted reporter Running $ python -c "import mshr" yields
ImportError: /usr/local/lib/libmshr.so.1.4: undefined symbol: _ZNK6dolfin12MeshTopology12ghost_offsetEm
-
Seems like mshr and dolfin are not compatible. Maybe there are changes in Dolfin that hasn't reached our testserver yet. What version of Dolfin is this?
-
Account Deleted reporter I recompiled and reinstalled mshr after switching back to stable build 1.4.0 and it worked fine. Seems like it's a conflict with the development version 1.4.0+ then.
-
Good. Yes, probably. I'll check that. Thanks for reporting.
-
If I remember correctly "No module named _mshr" was the symptom of http://fenicsproject.org/pipermail/fenics-support/2014-September/000862.html
-
I'm having trouble reproducing this. Joakim: Do you know exactly what version of Dolfin caused this? I have tried what both the tip of master and next (and with both cmake 2 and 3). What is with a recent checkout of the master branch of mshr?
-
Account Deleted reporter I pulled Dorsal from https://bitbucket.org/fenics-project/dorsal, then in dorsal.cfg I changed stable_build to False such that the newest dev-version 1.4.0+ was obtained. After the installation was done i pulled mshr and installed.
-
- changed status to resolved
This was fixed in 3b3eafa.
- Log in to comment
I get the same error if I install FEniCS 1.4.0 from PPA.