dolfin
always needs to be imported before mshr
, otherwise an ImportError
is raised:
» python -c 'import dolfin; import mshr'
» python -c 'import mshr'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/thomas/miniconda/envs/py27_fenics15dev_petsc35/lib/python2.7/site-packages/mshr.py", line 32, in <module>
_mshr = swig_import_helper()
File "/home/thomas/miniconda/envs/py27_fenics15dev_petsc35/lib/python2.7/site-packages/mshr.py", line 28, in swig_import_helper
_mod = imp.load_module('_mshr', fp, pathname, description)
ImportError: libslepc.so.3.5: cannot open shared object file: No such file or directory
It would help if you catch this exception in mshr and raise a new more informative exception.
The import order shouldn't matter, so something is going wrong here. I'm having trouble reproducing it. Where is libslepc.so located? Could you check with "ldd _mshr.so" and see if the paths to the external libraries looks reasonable and, in particular, if the entry with slepc refers to the actual location of libsleps.so?