Numpy module not found


I am trying to use annotate attribute data in paraview which requires numpy. When I try to use this utility, it gives me the following error:

Traceback (most recent call last):
  File "/apps/OpenFOAM/ParaView-5.9.1/lib/python3.8/site-packages/paraview/detail/", line 22, in <module>
    raise RuntimeError("'numpy' module is not found. numpy is needed for "\
RuntimeError: 'numpy' module is not found. numpy is needed for this functionality to work. Please install numpy and try again.
ERROR: In /builds/gitlab-kitware-sciviz-ci/build/superbuild/paraview/src/VTKExtensions/FiltersPython/vtkAnnotateAttributeDataFilter.cxx, line 79
vtkAnnotateAttributeDataFilter (0x23d42a80): Failed to import `paraview.detail.annotation` module.

In my .bashrc file, I have added the following path but it doesn’t work:
export PATH="$PATH:/apps/OpenFOAM/ParaView-5.9.1/lib/python3.8/site-packages"

I am also not able to use panda libraries along with paraview library paths on server. When I remove paraview paths from .bashrc file, panda libraries stop giving error. Please guide


I’ll attempt to address your numpy question. It looks like you are using the ParaView binaries provided by OpenFOAM. What is strange is that it looks like they are basing their package off binaries Kitware provides (ERROR: In /builds/gitlab-kitware-sciviz-ci/build/superbuild/), but Kitware binaries for 5.9.1 on linux are built against Python 3.9, not Python 3.8, which is what your error message indicates. I would check with OpenFOAM support to see what they are providing. In the meantime, you can download and try ParaView 5.9.1 (or 5.10.0) from

Thanks for your reply

No, the paraview I’m using is not the one that comes as third party apps with OpenFoam (OpenFoam is just the name of folder where it was installed). It was separately installed from link provided as ParaView-5.9.1-MPI-Linux-Python3.8-64bit.tar.gz and then library paths were added to be able to use paraFoam command. I’m able to use panda libraries when I remove these paths added for paraview:

export PATH=/apps/OpenFOAM/ParaView-5.9.1/bin:$PATH

export LD_LIBRARY_PATH=/apps/OpenFOAM/ParaView-5.9.1/lib:$LD_LIBRARY_PATH

I believe some libraries are getting mixed up but I don’t know how to resolve this

NumPy is already part of the ParaView package. Why are you trying to use a different one?

The LD_LIBRARY_PATH setting can certainly cause problems. Why was this added in the first place? How much does this setting affect?

Yes its part of paraview package but it was giving us numpy error so we installed numpy externally as well and included it’s path but the error persisted

As far as I know, LD_LIBRARY_PATH enables openfoam user to use paraFoam command and use paraview downloaded separately from

Any leads on how to solve this? we are not able to process data properly without annotating it

ParaView binary release do not support external python/numpy, nor using ParaView libraries provided by OpenFOAM. Do not do that.

1 Like