Closed DieselDriver closed 6 months ago
What are you trying to pip install on top of the apt packages?
Since you have installed FEniCSx through apt there is no need to install basix (or ffcx, ufl or dolfinx) with pip.
Without fenics packages I get the same error.
But when I try to use dolfinx in python scripts, there occurs following issue.
PETSc Error --- Application was linked against both OpenMPI and MPICH based MPI libraries and will not run correctly
Traceback (most recent call last):
File "/root/dolfinx_0.7.3/....py", line 17, in <module>
from dolfinx import fem, mesh, io, plot
File "/usr/lib/petsc/lib/python3/dist-packages/dolfinx/__init__.py", line 40, in <module>
from dolfinx.generation import (IntervalMesh, BoxMesh, RectangleMesh,
File "/usr/lib/petsc/lib/python3/dist-packages/dolfinx/generation.py", line 13, in <module>
from dolfinx import cpp, fem
File "/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/__init__.py", line 10, in <module>
from dolfinx.fem.assemble import (apply_lifting, apply_lifting_nest,
File "/usr/lib/petsc/lib/python3/dist-packages/dolfinx/fem/assemble.py", line 12, in <module>
from petsc4py import PETSc
File "/usr/local/lib/python3.9/dist-packages/petsc4py/PETSc.py", line 4, in <module>
PETSc._initialize()
File "petsc4py/PETSc/PETSc.pyx", line 581, in petsc4py.PETSc._initialize
File "petsc4py/PETSc/PETSc.pyx", line 474, in petsc4py.PETSc.initialize
*** The MPI_Comm_size() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
This is not solveable at moment. :-(
@drew-parsons do you know why PETSc is linked like the above?
PETSc Error --- Application was linked against both OpenMPI and MPICH based MPI libraries and will not run correctly
Does this indicate a non-apt installed petsc?
File "/usr/local/lib/python3.9/dist-packages/petsc4py/PETSc.py", line 4, in <module>
That's definitely a non-apt installed petsc4py. On ubuntu and debian petsc4py is shipped in /usr/lib/petsc/
.
We are also suggesting that all installation questions should be asked on discourse, so we may want to wait for a further answer by @DieselDriver and then close this.
Building wheels for collected packages: petsc
Building wheel for petsc (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
petsc: this package cannot be built as a wheel
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for petsc
Running setup.py clean for petsc
Failed to build petsc
ERROR: Could not build wheels for petsc, which is required to install pyproject.toml-based projects
If I try to install with your requirements-file, it also will not be installed.
In general you must not mix packages installed by apt and those installed by pip. You have already destroyed the system petsc4py installation, and now you are trying to do so with petsc too.
Please uninstall any earlier pip install
attempt, and then start back from installing basix (rather than dolfinx).
I am going to close this down, if you get further errors please post at https://fenicsproject.discourse.group/
Summarize the issue
installation instructions does not work for Python
I tried several distributions but on every the installation ends with with issue.
How to reproduce the bug
Minimal Example (Python)
No response
Output (Python)
No response
Version
0.7.3
DOLFINx git commit
No response
Installation
No response
Additional information
No response