astrojuanlu / fenics-recipes

This repository contains conda recipes for the FEniCS libraries
The Unlicense
13 stars 15 forks source link

Cannot import mshr #57

Open sophia-wright-blue opened 8 years ago

sophia-wright-blue commented 8 years ago

I installed mshr and it shows up in the list of packages installed in the fenics27 env, but when i try to import mshr, i get an error saying ' no module named mshr'

also, there is no mshr folder in anaconda/env/fenics27/lib/python2.7/site-packages

any help figuring this out would be greatly appreciated. thank you.

Sophia.

twmr commented 8 years ago

I guess that the output of python -c ' import mshr' is just

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named mshr

right? Importing dolfin works fine?

sophia-wright-blue commented 8 years ago

That's right, i'm able to import dolfin, some of the demo codes work fine too,

thanks for replying,

astrojuanlu commented 8 years ago

Thanks for reporting @sophia-wright-blue, apparently there are some upstream problems with mshr, see https://bitbucket.org/fenics-project/mshr/issues/40/mshr-16-cgal-compilation-problem and https://github.com/Juanlu001/fenics-recipes/issues/56.

sophia-wright-blue commented 8 years ago

thanks for replying Juan. how would you recommend i resolve this problem. the bitbucket link that you pointed me to shows this issue as resolved. i currently have fenics installed on Ubuntu through the anaconda package. thank you.

mentrelli commented 7 years ago

I have the same problem reported (18 months ago) by @sophia-wright-blue. Following the instruction given in "The FEniCS Tutorial", I installed FEniCS under Anaconda, on a Ubuntu 16.04 machine (https://fenicsproject.org/download/):

$ conda create -n fenicsproject -c conda-forge fenics $ source activate fenicsproject

and I tried to go through the tutorial. The first example works, but the second one (ft02_poisson_membrane) cannot be tested because of "ModuleNotFoundError: No module named 'mshr'".

Any idea on how to solve this problem? Thank you very much.

aziz-hakim commented 5 years ago

When i tried to run ft02_poisson_membrane.py i get these following messages with a error:

ModuleNotFoundError Traceback (most recent call last)

in () 1 from __future__ import print_function 2 from fenics import * ----> 3 from mshr import * 4 import numpy as np 5 ModuleNotFoundError: No module named 'mshr' Please i need help regarding this issue.I am new to fenics.Thanks in Advance.