Skip to content

conda install of openPMD-api causes numpy error #1123

Open
@PrometheusPi

Description

Performed steps
I freshly installed openPMD-api via conda as follows

conda create -n openpmd2 -c conda-forge openpmd-api
conda activate openpmd2
conda install -c conda-forge jupyter

This worked without any problems and due to its dependencies installed numpy alongside openPMD-api and ipython alongside juypter.
However, when loading openPMD-api in ipython, the following error occurred:

In [1]: import openpmd_api as io
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~/.conda/envs/openpmd2/lib/python3.9/site-packages/numpy/core/__init__.py in <module>
     21 try:
---> 22     from . import multiarray
     23 except ImportError as exc:

~/.conda/envs/openpmd2/lib/python3.9/site-packages/numpy/core/multiarray.py in <module>
     11 
---> 12 from . import overrides
     13 from . import _multiarray_umath

~/.conda/envs/openpmd2/lib/python3.9/site-packages/numpy/core/overrides.py in <module>
      6 
----> 7 from numpy.core._multiarray_umath import (
      8     add_docstring, implement_array_function, _get_implementing_args)

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-1-f17e2ff3c4c0> in <module>
----> 1 import openpmd_api as io

~/.conda/envs/openpmd2/lib/python3.9/site-packages/openpmd_api/__init__.py in <module>
      1 from . import openpmd_api_cxx as cxx
      2 from .openpmd_api_cxx import *  # noqa
----> 3 from .DataFrame import particles_to_dataframe
      4 from .DaskDataFrame import particles_to_daskdataframe
      5 from .DaskArray import record_component_to_daskarray

~/.conda/envs/openpmd2/lib/python3.9/site-packages/openpmd_api/DataFrame.py in <module>
      7 """
      8 import math
----> 9 import numpy as np
     10 try:
     11     import pandas as pd

~/.conda/envs/openpmd2/lib/python3.9/site-packages/numpy/__init__.py in <module>
    148     from . import _distributor_init
    149 
--> 150     from . import core
    151     from .core import *
    152     from . import compat

~/.conda/envs/openpmd2/lib/python3.9/site-packages/numpy/core/__init__.py in <module>
     46 """ % (sys.version_info[0], sys.version_info[1], sys.executable,
     47         __version__, exc)
---> 48     raise ImportError(msg)
     49 finally:
     50     for envkey in env_added:

ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/home/.../.conda/envs/openpmd2/bin/python"
  * The NumPy version is: "1.21.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: libcblas.so.3: cannot open shared object file: No such file or directory

(The same errors occurs when using python instead of ipython.)

System environment

  • operating system: Linux version 3.10.0-1127.19.1.el7.x86_64 (mockbuild@x86-vm-28.build.eng.bos.redhat.com)
  • machine: ZIH (TU Dresden) taurus (head node)
  • name and version of Python implementation: Python 3.9.7
  • conda version: conda 4.4.7
  • openPMD-api: openpmd-api 0.14.2 nompi_py39h7b626f2_100 conda-forge
  • numpy: numpy 1.21.2 py39hdbf815f_0 conda-forge

Additional context
none

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions