Repository navigation
FAQ
Carles Tena edited this page Oct 6, 2026
·
2 revisions
If you encounter any error, please check the FAQ. For other problems, you can create an issue on GitHub or contact us directly.
During the installation of NES using pip, you might get the following errors:
compilation terminated.
failure.
removing: _configtest.c _configtest.o
error: Cannot compile MPI programs. Check your configuration!!!
Installing mpi4py requires a working MPI implementation.
If you are running on a supercomputer or cluster, check with
the system administrator or refer to the system user guide.
Otherwise, if you are running on a laptop or desktop computer,
your may be missing the MPICH or Open MPI development package:
* On Fedora/RHEL systems, run:
$ sudo dnf install mpich-devel # for MPICH
$ sudo dnf install openmpi-devel # for Open MPI
* On Debian/Ubuntu systems, run:
$ sudo apt install libmpich-dev # for MPICH
$ sudo apt install libopenmpi-dev # for Open MPI
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Building wheel for findlibs (setup.py) ... done
Created wheel for findlibs: filename=findlibs-0.0.5-py3-none-any.whl size=6939 sha256=27532346a722358a057f34e325f32835b410b8ebf089a9dabc7403c1eb684253
Stored in directory: /home/bscuser/.cache/pip/wheels/e5/eb/3a/fc9bb01081f51631725acecba7bbfcdd14a53765635ffe11f5
Successfully built nes findlibs
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
In this case, do as instructed. For example, if you are a Debian/Ubuntu user, you can try installing mpich and NES again:
sudo apt install libmpich-dev
pip install nes
...
/home/avilanov/anaconda3/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_datatype_resize'
/home/avilanov/anaconda3/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_hash_table_set_value_uint64'
/home/avilanov/anaconda3/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `MPIR_being_debugged'
/home/avilanov/anaconda3/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_list_t_class'
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
error: Cannot link MPI programs. Check your configuration!!!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Successfully built NES
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
To solve this go to the folder where you have compiler_compat, remove the ld folder and symbolic link:
cd /home/{username}/anaconda3/compiler_compat/
rm -f ld
ln -s /usr/bin/ld ld
Install NES again:
pip install nes
And proceed to recreate the symbolic link:
rm -f ld
ln -s ../bin/x86_64-conda-linux-gnu-ld ld
Sometimes nes gets installed, but when we import the module we get:
ImportError Traceback (most recent call last)
Cell In[2], line 1
----> 1 import nes
2 import pandas as pd
3 import numpy as np
File ~/anaconda3/envs/providentia-env_v3.0.0/lib/python3.11/site-packages/nes/__init__.py:8
2 __version__ = "1.1.11"
3 __all__ = [
4 'open_netcdf', 'concatenate_netcdfs', 'create_nes', 'from_shapefile', 'calculate_geometry_area', 'Nes', 'LatLonNes',
5 'LCCNes', 'RotatedNes', 'RotatedNestedNes', 'MercatorNes', 'PointsNesProvidentia', 'PointsNesGHOST', 'PointsNes'
6 ]
----> 8 from .load_nes import open_netcdf, concatenate_netcdfs
9 # from .load_nes import open_raster
10 from .create_nes import create_nes, from_shapefile
File ~/anaconda3/envs/providentia-env_v3.0.0/lib/python3.11/site-packages/nes/load_nes.py:6
4 import sys
5 from numpy import empty
----> 6 from mpi4py import MPI
7 from netCDF4 import Dataset
8 from warnings import warn
ImportError: libmpi.so.12: cannot open shared object file: No such file or directory
Try installing mpi4py using conda:
pip uninstall nes
conda install -c conda-forge openmpi mpi4py
pip install nes