I'm trying to install a python(3) package which depends on mpi4py
on a CentOS 7
machine.
I have tried multiple ways of doing everything, even start from clean virtualenvs
but I keep getting:
ImportError: $PATH_TO_VENV/lib/python3.6/site-packages/mpi4py/MPI.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ompi_mpi_logical8
This comes up even if, after a successful installation through pip
, I just write in the interpreter:
>>> import mpi4py
>>> from mpi4py import MPI
Has anyone got a solution for this?
I had the same problem and I found that I have to install the library using the env MPICC=
prefix.
env MPICC=/usr/lib64/openmpi/bin/mpicc pip install --no-cache-dir mpi4py
I met this problem today, this is how I solve it: conda install mpi4py
The following packages will be downloaded:
package | build
---------------------------|-----------------
mpi-1.0 | openmpi 4 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
mpi4py-3.0.3 | py37hbfacf26_1 647 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
openmpi-4.0.3 | hdf1f1ad_1 3.9 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
------------------------------------------------------------
Total: 4.6 MB
I think either missing mpi-1.0 or an out-dated openmpi will cause the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With