Hi i am working on virtual machine provided by my institute as ubuntu operating system. I want to guidance in installing in the Fenics_shells. because i am trying to install by guidance at the site “FEniCS-Shells — fenics-shells” and it not working for me
That’s not a good description. You’ll have to tell what you did and what is “not working” for anyone to be able to help.
the demos given on site “demo_naghdi-linear-hypar.py
.”
while running the above demos there are following error .
" ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_116021/393409150.py in
4 import matplotlib.pyplot as plt
5
----> 6 from dolfin import *
7 from mshr import *
8 from ufl import Index
/usr/lib/petsc/lib/python3/dist-packages/dolfin/init.py in
136 from . import la
137 from . import mesh
→ 138 from . import parameter
139
140 from .common import timer
/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/init.py in
9
10 import dolfin.cpp as cpp
—> 11 from ffc import default_jit_parameters
12 from dolfin.cpp.parameter import parameters, Parameters
13
~/.local/lib/python3.10/site-packages/ffc/init.py in
22
23 # Import compiler functions
—> 24 from ffc.compiler import compile_form, compile_element
25
26 # Import JIT compiler
~/.local/lib/python3.10/site-packages/ffc/compiler.py in
122
123 # FFC modules
→ 124 from ffc.log import info, info_green, warning, error
125 from ffc.parameters import validate_parameters
126 from ffc.analysis import analyze_ufl_objects
~/.local/lib/python3.10/site-packages/ffc/log.py in
27
28 # UFL modules
—> 29 from ufl.log import Logger
30 from ufl.log import log_functions
31 from ufl.log import INFO, DEBUG, WARNING, ERROR, CRITICAL
ModuleNotFoundError: No module named ‘ufl.log’
"
You are using the wrong version of ufl, as legacy dolfin should use ufl_legacy, rather than ufl
, see: Announcement: ufl_legacy and legacy dolfin
For ufl_legacy also came same error.
" ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_116021/2622800552.py in
4 import matplotlib.pyplot as plt
5
----> 6 from dolfin import *
7 from mshr import *
8 #from ufl_legacy import Index
/usr/lib/petsc/lib/python3/dist-packages/dolfin/init.py in
136 from . import la
137 from . import mesh
→ 138 from . import parameter
139
140 from .common import timer
/usr/lib/petsc/lib/python3/dist-packages/dolfin/parameter/init.py in
9
10 import dolfin.cpp as cpp
—> 11 from ffc import default_jit_parameters
12 from dolfin.cpp.parameter import parameters, Parameters
13
~/.local/lib/python3.10/site-packages/ffc/init.py in
22
23 # Import compiler functions
—> 24 from ffc.compiler import compile_form, compile_element
25
26 # Import JIT compiler
~/.local/lib/python3.10/site-packages/ffc/compiler.py in
122
123 # FFC modules
→ 124 from ffc.log import info, info_green, warning, error
125 from ffc.parameters import validate_parameters
126 from ffc.analysis import analyze_ufl_objects
~/.local/lib/python3.10/site-packages/ffc/log.py in
27
28 # UFL modules
—> 29 from ufl.log import Logger
30 from ufl.log import log_functions
31 from ufl.log import INFO, DEBUG, WARNING, ERROR, CRITICAL
ModuleNotFoundError: No module named 'ufl.log"
What version of ffc have you installed, and how have you installed it?
Delete everything from .local/lib
. You have installed dolfin from the ubuntu PPA, but then overwrited the ubuntu installation with your own installation in .local
.
For future posts:
- please make to use proper formatting (“```”) when posting the errors
my error
- do not continue to next steps or installation of further libraries until you sorted the actual installation of FEniCS. You have opened up to now five posts in this forum, and all five of them were about a wrong installation Fenicsx 0.8 Installation Issues, Issue Related to ufl, Facing Problem working with Fenics, How to install all dependencies at a time, Guide me to install fenics_shells . While we are happy to help, we are not a professional support team, and keep opening questions phrased in a slightly different way which end up discussing the same issue over and over again is not the way you want to interact in this forum. Open one topic, and use it until you managed to solve your installation problem. If you persevere in this behavior we may interpret your posting multiple topics as a (illegitimate) way to try to boost the attention you receive from the readers of the forum. Not only doing that doesn’t work, but may have unfortunate consequences for your user (worst case scenario, a ban).
ps: by the way, we have created a new library (called pusimp
) that will automatically detect the case of conflicting libraries in .local/lib
and warn the user of the mistake, which is released on the newest ubuntu. You probably have a version of ubuntu which is not the latest one and thus this feature is not available.
After deleting everything from .local/lib
you may want to have a look at the installation line I have in the first code cell of Install fenics-shells - #11 by francesco-ballarin , as (for instance) it should help you replacing all instances of ufl
with ufl_legacy
.
Dear sir,
I hope you’re doing well. I want to sincerely apologize for any confusion or inconvenience caused by my multiple posts. My intention was not to create unnecessary sections or topics, but rather to seek help for different attempts I’ve made in resolving my FEniCS installation issues.
Initially, I installed FEniCS through WSL but encountered difficulties in running it. I then switched to using Docker to address those problems, but again, I was unable to run the code successfully. At this point, I’m using a virtual machine provided by my institute, which runs Ubuntu. I’m currently trying to install FEniCS and FEniCS-shells on this machine to run the demos available on the FEniCS-shells website, but I’m still facing issues.
I truly appreciate the support this forum provides and apologize again for any confusion caused by my earlier posts. I will make sure to consolidate everything into a single thread going forward.
Thank you for your understanding and support.