Open Epoxid2 opened 2 months ago
a similar problem happens when installing into pull quay.io/dolfinadjoint/pyadjoint:latest:
root@0c0ec9e67a70:/src# python3 Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import fenics Traceback (most recent call last): File "
", line 1, in File "/usr/lib/python3/dist-packages/fenics/init.py", line 7, in from dolfin import * File "/usr/lib/python3/dist-packages/dolfin/init.py", line 144, in from .fem.assembling import (assemble, assemble_system, assemble_multimesh, assemble_mixed, File "/usr/lib/python3/dist-packages/dolfin/fem/assembling.py", line 38, in from ufl.form import sub_forms_by_domain ImportError: cannot import name 'sub_forms_by_domain' from 'ufl.form' (/usr/lib/python3/dist-packages/ufl/form.py)
The pip installer does not have a fenics version specified and then downgrades to latest stable, which then breaks everything. You have to add —no-deps to make it work
I followed the installation as per the readme, but that keeps breaking the official fenics docker image.
inside the docker image, pip install git+https://github.com/sebastkm/hybrid-fem-nn.git@master results in the error: ERROR: fenics-dolfin 2019.2.0.dev0 has requirement fenics-dijitso<2019.3,>=2019.2.0.dev0, but you'll have fenics-dijitso 2019.1.0 which is incompatible. ERROR: fenics-dolfin 2019.2.0.dev0 has requirement fenics-ffc<2019.3,>=2019.2.0.dev0, but you'll have fenics-ffc 2019.1.0.post0 which is incompatible. ERROR: fenics-dolfin 2019.2.0.dev0 has requirement fenics-ufl<2019.3,>=2019.2.0.dev0, but you'll have fenics-ufl 2019.1.0 which is incompatible. Successfully installed fenics-2019.1.0 fenics-dijitso-2019.1.0 fenics-ffc-2019.1.0.post0 fenics-fiat-2019.1.0 fenics-ufl-2019.1.0 ufl-dnn-0.0.0
Then, fenics can no longer be loaded: