Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing fenics adapter may break FEniCS installation #103

Open
BenjaminRodenberg opened this issue Nov 10, 2020 · 8 comments · Fixed by #120
Open

Installing fenics adapter may break FEniCS installation #103

BenjaminRodenberg opened this issue Nov 10, 2020 · 8 comments · Fixed by #120
Assignees
Labels
help wanted Extra attention is needed usability

Comments

@BenjaminRodenberg
Copy link
Member

BenjaminRodenberg commented Nov 10, 2020

See https://fenicsproject.discourse.group/t/installing-python-package-with-fenics-dependency-breaks-fenics-installation/4476.

To me this looks like an upstream issue. The fenics adapter depends on fenics. Therefore the following dependencies in setup.py look correct:

install_requires=['pyprecice>=2.0.0', 'fenics', 'scipy', 'numpy>=1.13.3'],

However, if we assume a user has already fixed the FEniCS installation by manually uninstalling fenics-ufl, the fenics adapter will reinstall fenics-ufl due to the fenics dependency and (again) break the FEniCS installation. The user has to uninstall fenics-ufl (again) after installing the fenics adapter.

A possible solution that I have in mind is to declare FEniCS as a dependency of the adapter, but avoid reinstalling fenics-ufl. Is this possible?

@BenjaminRodenberg BenjaminRodenberg added the bug Something isn't working label Nov 10, 2020
@BenjaminRodenberg BenjaminRodenberg added this to the v1.0.0 milestone Nov 10, 2020
@BenjaminRodenberg BenjaminRodenberg self-assigned this Nov 10, 2020
@BenjaminRodenberg BenjaminRodenberg removed this from the v1.0.0 milestone Dec 10, 2020
@BenjaminRodenberg
Copy link
Member Author

This is a sporadic issue. We will keep it open as an information for users, but won't fix it until we can reproduce it.

@uekerman
Copy link
Member

I guess we can reproduce the problem with this docker file: https://github.com/uekerman/Coupled-Brittle-Fracture/blob/master/brittle-fracture.dockerfile

@BenjaminRodenberg
Copy link
Member Author

The Dockerfile from https://fenicsproject.discourse.group/t/installing-python-package-with-fenics-dependency-breaks-fenics-installation/4476 allows us to reproduce the error. I think this is a upstream issue, where we currently cannot do anything.

@BenjaminRodenberg BenjaminRodenberg added the wontfix This will not be worked on label Jan 12, 2021
@fsimonis
Copy link
Member

From my understanding, fenics is a pure meta package, which simply depends on all major modules.

Hence, import * from fencis shouldn't work as there is no fenics module. In fact, the module is not importable when installed in a venv.

My best guess is that the FEniCS tutorials are out of date and one should import the modules directly:

import ufl, dijitso, FIAT, ffc

This modified Dockerfile should illustrate this issue.

@uekerman
Copy link
Member

For pip noobs (like me), the workaround is:

pip3 uninstall -y fenics-ufl

@BenjaminRodenberg
Copy link
Member Author

Another alternative is to do the following:

pip3 install --no-deps fenicsadapter

As far as I understand the broken fenics-ufl is installed due to fenics dependency.

BenjaminRodenberg added a commit that referenced this issue Mar 26, 2021
Setting fenics as install requirement may break the installation (see #103). We therefore check whether fenics is installed and abort, if this is not the case.
@IshaanDesai
Copy link
Member

Another alternative is to do the following:

pip3 install --no-deps fenicsadapter

Should not be pip3 install --no-deps fenicsprecice ? Do we still support the older name?

BenjaminRodenberg added a commit that referenced this issue Apr 8, 2021
Setting fenics as install requirement may break the installation (see #103). We therefore check whether FEniCS is installed and abort, if this is not the case.

Co-authored-by: Frédéric Simonis <simonisfrederic@gmail.com>
@BenjaminRodenberg BenjaminRodenberg added this to the v1.1.0 milestone Apr 12, 2021
@BenjaminRodenberg BenjaminRodenberg added help wanted Extra attention is needed usability and removed wontfix This will not be worked on labels Oct 11, 2023
@BenjaminRodenberg BenjaminRodenberg removed this from the v1.1.0 milestone Oct 11, 2023
@BenjaminRodenberg
Copy link
Member Author

Reopening this issue with the same rationale as for #154: Would be nice to avoid this problem trough technical means and a proper dependency handling.

@BenjaminRodenberg BenjaminRodenberg removed the bug Something isn't working label Oct 11, 2023
@BenjaminRodenberg BenjaminRodenberg added this to the v2.x.x milestone Feb 12, 2024
@BenjaminRodenberg BenjaminRodenberg modified the milestones: v2.x.x, v2.2.0 Mar 13, 2024
@BenjaminRodenberg BenjaminRodenberg removed this from the v2.2.0 milestone Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed usability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants