Issue Related to ufl

hello everyone, ia am finding the error while executing the code.
and that error related to ufl
ModuleNotFoundError: No module named ‘ufl.log’

Please specify what version of UFL and Legacy FEniCS (or DOLFINx) that you are using, and add the exact commands that you are calling plus a full traceback.

1 Like

I am installing FEniCSx 0.8 with ufl version is 2024.1.0

ufl.log was removed in 2023: Use Python warnings and exceptions instead of custom logging by mscroggs · Pull Request #137 · FEniCS/ufl · GitHub.

1 Like

Is there any updates codes for demos by which i can start the Fenics or Dolfin.
because when i run the code given in the demo_nonlinear-naghdi-cylindrical.py file I get error

Going by the name of the demo you are trying to run: Clamped semi-cylindrical Naghdi shell under point load — fenics-shells

You should consider
https://fenics-shells.github.io/fenicsx-shells/

For general FEniCSx demos see:
https://docs.fenicsproject.org/dolfinx/v0.8.0/python/demos.html
Or
https://jsdokken.com/dolfinx-tutorial/

1 Like

there is issue related to dolfinex.
when i run the code that show that ModuleNotFoundError: No module named ‘dolfinx’

Please then state:

  1. How did you install DOLFINx

in your other post (Fenicsx 0.8 Installation Issues - #3 by Vivek) you said it worked, so it is getting quite complicated to follow your issue

Yes Fenics is installed in my Ubuntu system.
I install the dolfinx by the following link “GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment” in this there is Ubuntu packages from there I install.

then I open the following link “Demos — DOLFINx 0.8.0 documentation
and then I run the first demos example " demo_poisson.py."

but when i run the following code then it show show that ModuleNotFoundError: No module named ‘dolfinx’.
and ModuleNotFoundError: No module named ‘dolfinx’

Please tell me procedure to solve .
Please

Please run
python3 -m pip list and which python3 in your terminal to ensure that you are using the correct python.

Add the output of these commands here.

1 Like

this is on UBUNTU:

vm236@vm236:~$ python3 -m pip list
Package Version


apturl 0.5.2
attrs 19.3.0
backcall 0.1.0
bcrypt 3.1.7
bleach 3.1.1
blinker 1.4
Brlapi 0.7.0
certifi 2019.11.28
cffi 1.14.0
chardet 3.0.4
Click 7.0
colorama 0.4.3
command-not-found 0.3
cryptography 2.8
cupshelpers 1.0
cycler 0.10.0
dbus-python 1.2.16
decorator 4.4.2
defer 1.0.6
defusedxml 0.6.0
distro 1.4.0
distro-info 0.23+ubuntu1.1
duplicity 0.8.12.0
entrypoints 0.3
fasteners 0.14.1
fenics-basix 0.4.2
fenics-dijitso 2019.2.0.dev0
fenics-dolfin 2019.2.0.13.dev0
fenics-dolfinx 0.4.1
fenics-ffc 2019.2.0.dev0
fenics-ffcx 0.4.2
fenics-fiat 2019.2.0.dev0
fenics-ufl 2022.1.0
fenics-ufl-legacy 2022.3.0
future 0.18.2
html5lib 1.0.1
httplib2 0.14.0
idna 2.8
importlib-metadata 1.5.0
ipykernel 5.2.0
ipython 7.13.0
ipython-genutils 0.2.0
ipywidgets 6.0.0
jedi 0.15.2
Jinja2 2.10.1
jsonschema 3.2.0
jupyter-client 6.1.2
jupyter-console 6.0.0
jupyter-core 4.6.3
keyring 18.0.1
kiwisolver 1.0.1
language-selector 0.1
launchpadlib 1.10.13
lazr.restfulclient 0.14.2
lazr.uri 1.0.3
llvmlite 0.31.0
lockfile 0.12.2
louis 3.12.0
macaroonbakery 1.3.1
Mako 1.1.0
MarkupSafe 1.1.0
matplotlib 3.1.2
mistune 0.8.4
monotonic 1.5
more-itertools 4.2.0
mpi4py 3.1.3
mpmath 1.1.0
mshr 2019.2.0.dev0
nbconvert 5.6.1
nbformat 5.0.4
netifaces 0.10.4
notebook 6.0.3
numba 0.48.0
numpy 1.17.4
oauthlib 3.1.0
olefile 0.46
pandocfilters 1.4.2
paramiko 2.6.0
parso 0.5.2
petsc4py 3.12.0
petsc4py-real 3.12.0
pexpect 4.6.0
pickleshare 0.7.5
Pillow 7.0.0
pip 20.0.2
pkgconfig 1.5.1
ply 3.11
prometheus-client 0.7.1
prompt-toolkit 2.0.10
protobuf 3.6.1
psutil 5.5.1
pybind11 2.9.2
pycairo 1.16.2
pycparser 2.19
pycups 1.9.73
Pygments 2.3.1
PyGObject 3.36.0
PyJWT 1.7.1
pymacaroons 0.13.0
PyNaCl 1.3.0
pyparsing 2.4.6
pyRFC3339 1.1
pyrsistent 0.15.5
python-apt 2.0.1+ubuntu0.20.4.1
python-dateutil 2.7.3
python-debian 0.1.36+ubuntu1.1
pytz 2019.3
pyxdg 0.26
PyYAML 5.3.1
pyzmq 18.1.1
reportlab 3.5.34
requests 2.22.0
requests-unixsocket 0.2.0
scipy 1.3.3
SecretStorage 2.3.1
Send2Trash 1.5.0
setuptools 45.2.0
simplejson 3.16.0
six 1.14.0
slepc4py 3.12.0
slepc4py-real 3.12.0
ssh-import-id 5.10
sympy 1.5.1
systemd-python 234
terminado 0.8.2
testpath 0.4.4
tornado 5.1.1
traitlets 4.3.3
ubuntu-drivers-common 0.0.0
ubuntu-pro-client 8001
ufw 0.36
unattended-upgrades 0.1
urllib3 1.25.8
usb-creator 0.3.7
wadllib 1.3.3
wcwidth 0.1.8
webencodings 0.5.1
wheel 0.34.2
widgetsnbextension 2.0.0
xkit 0.0.0
zipp 1.0.0

vm236@vm236:~$ which python3
/bin/python3

You have a super old version of dolfinx installed, definitely not 0.8.0.

so how to install dolfinx 0.8.0 version