Hi everyone. I have trouble using dolfin on my Macbook(Intel Core i7)
The trouble is
“Traceback (most recent call last):
File “/Users/yuanheng/Downloads/NematicInChannel/pythonModules/initializeSimulation.py”, line 2, in
from dolfin import *
ModuleNotFoundError: No module named ‘dolfin’”
And I use
“conda create -n fenicsx-env
conda activate fenicsx-env
conda install -c conda-forge fenics-dolfinx mpich pyvista” to install
And the output for:
conda activate fenicsproject
And for “which pip3” command
the output is /Users/yuanheng/opt/anaconda3/envs/fenicsproject/bin/pip3
If I call
which pip3 outside the conda environment, the path I am getting is: /Users/yuanheng/opt/anaconda3/bin/pip3
Here you are installing DOLFINx, not DOLFIN.
Thus you would need to load the dolfinx module.
For demos see:
Thank you very much for your reply. However, I tried DOLFINx instead but the same issue occur.
I think this posting(Anaconda installation of FEniCS on MacOS) will be helpful. Why not try using docker or another platform other than conda?
P.S.) I also often use macOS, but there were no major errors in operation when using docker.
Thank you very much for your help. I just installed docker. However, the same issue occurred again.
If you have run
vigilant_knuth among docker containers, you need to run the
terminal program provided by macOS and entre the docker container through commands like
$ docker exec -ti vigilant_knuth /bin/bash -l
Then, the ubuntu environment where dolfinx is installed is loaded.
After that, you can check whether dolfinx is installed with the
python3 -c command!