本文介绍了库未加载:@ rpath/libopenblasp-r0.2.19.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该如何解决?

Monas-MacBook-Pro:02_02 mona$ python
Python 3.6.1 |Anaconda custom (x86_64)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/mona/anaconda/lib/python3.6/site-packages/cv2.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libopenblasp-r0.2.19.dylib
  Referenced from: /Users/mona/anaconda/lib/libopencv_hdf.3.2.0.dylib
  Reason: image not found

使用以下命令安装opencv:

Installed opencv using:

conda install -c conda-forge opencv=3.2.0

甚至尝试过:

$ conda install -c anaconda openblas=0.2.19
Fetching package metadata ...........
Solving package specifications: .

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

The following NEW packages will be INSTALLED:

    libgfortran: 3.0.0-1       anaconda
    openblas:    0.2.19-1      anaconda

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

    conda:       4.3.22-py36_0 conda-forge --> 4.3.22-py36_0 anaconda
    conda-env:   2.6.0-0       conda-forge --> 2.6.0-0       anaconda

Proceed ([y]/n)? y

conda-env-2.6. 100% |################################| Time: 0:00:00  90.59 kB/s
libgfortran-3. 100% |################################| Time: 0:00:00 387.65 kB/s
openblas-0.2.1 100% |################################| Time: 0:01:03 107.62 kB/s
conda-4.3.22-p 100% |################################| Time: 0:00:00 596.24 kB/s

但仍然是相同的错误.这是我的conda list https://pastebin.com/gP0F0Qnz 的输出我应该如何修复它以便import cv2?

But still the same error.Here's the output of my conda list https://pastebin.com/gP0F0QnzHow should I fix it so that I can import cv2?

推荐答案

莫娜

似乎您没有安装openblas,这是opencv的必需模块,但是由于某种原因它没有包含在其依赖项中,因此您必须手动安装它,可以通过conda list|grep openblas

it seems that you do not have openblas installed, which is a required module of opencv, but somehow is not included in its dependencies so you have to install it manually, you may confirm this with conda list|grep openblas

如果没有openblas,请使用以下命令进行安装:conda install -c conda-forge openblas=0.2.19

If you do not have openblas, install it using following command:conda install -c conda-forge openblas=0.2.19

希望有帮助

这篇关于库未加载:@ rpath/libopenblasp-r0.2.19.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 01:17