I am trying to get the python binding for precice running and upon installing I am getting ValueError (described below). I previously had anaconda installed and using its python3.8.10 and libprecice2.2.0 but now I have removed anaconda and updated precice and still I am facing similar issue.
- preCICE version: libprecice2_2.2.1
- Operating system or platform (e.g. “Ubuntu 20.04”)
- Installation method: apt, pip3
- Dependency versions: python3.8.10, numpy1.17.4
pip3 install --user pyprecice
Processing /home/mansari/.cache/pip/wheels/53/96/9c/871e18d16d08e5d3a1eedaf5bbe74d115291e44c67c7379f70/pyprecice-2.2.1.1-py2.py3-none-any.whl
Requirement already satisfied: mpi4py in /home/mansari/.local/lib/python3.8/site-packages (from pyprecice) (3.0.3)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from pyprecice) (1.17.4)
ERROR: fenicsprecice 1.1.0+10.gb248cf0 requires scipy, which is not installed.
Installing collected packages: pyprecice
Successfully installed pyprecice-2.2.1.1
**********$ python3
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import precice
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mansari/.local/lib/python3.8/site-packages/precice/__init__.py", line 4, in <module>
from cyprecice import Interface, action_read_iteration_checkpoint, action_write_iteration_checkpoint, action_write_initial_data, get_version_information
File "cyprecice/cyprecice.pyx", line 1, in init cyprecice
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Note:
After upgrading the numpy version to 1.20 (same python version) it started working. Is this an issue with the bindings or did I do something wrong before?