Home > front end >  Original error was: dlopen(/Users/ulto4/miniforge3/envs/python386/lib/python3.8/site-packages/numpy/
Original error was: dlopen(/Users/ulto4/miniforge3/envs/python386/lib/python3.8/site-packages/numpy/

Time:10-20

Whenever I import numpy in any program I get this error:

Original error was: dlopen(/Users/ulto4/miniforge3/envs/python386/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so, 2): Library not loaded: @rpath/libcblas.3.dylib
  Referenced from: /Users/ulto4/miniforge3/envs/python386/lib/python3.8/site-packages/numpy/core/_multiarray_umath.cpython-38-darwin.so
  Reason: image not found

This happens with numpy 1.19.5 and numpy 1.21.1 on my Mac M1. The weird thing is just a month ago everything was fine. I install numpy with conda install numpy.

Again the code doesn't matter because even if I just have import numpy I get this error.

How would I go about fixing this?

CodePudding user response:

Try to install openblas with conda:

conda install -c conda-forge openblas

in your terminal.

You should see something like this:


Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment /Users/user/anaconda:

The following packages will be UPDATED:

    openblas:  0.2.19-1              --> 0.2.19-2                      conda-forge
    scipy:     0.19.1-py36h3e758e1_3 --> 0.19.1-py36_blas_openblas_202 conda-forge [blas_openblas]

The following packages will be SUPERSEDED by a higher-priority channel:

    conda:     4.3.27-py36hb556a21_0 --> 4.3.27-py36_0                 conda-forge
    conda-env: 2.6.0-h36134e3_0      --> 2.6.0-0                       conda-forge

Proceed ([y]/n)? y

conda-env-2.6. 100% |##################################################| Time: 0:00:00 814.91 kB/s
openblas-0.2.1 100% |##################################################| Time: 0:00:00  18.46 MB/s
conda-4.3.27-p 100% |##################################################| Time: 0:00:00   4.44 MB/s
  • Related