import cv2
File “/xx/.venv/lib/python3.7/site-packages/cv2/init.py”
from .cv2 import *
ImportError: libcblas.so.3: cannot open shared object file: No such file or directory
1.执行 sudo apt-get install python3 命令安装python3
1 | sudo apt-get install python3 |
2.执行 python3 -V 查看 python3是否安装成功
1 | python3 -V |
3.执行 pip3 install opencv-python
1 | pip3 install opencv-python |
4.执行 pip3 list 验证 pip3中是否安装了opencv-python
1 | pip3 list |
5.代码中import cv2,提示以下错误:
import cv2
File “/xx/.venv/lib/python3.7/site-packages/cv2/init.py”
from .cv2 import *
ImportError: libcblas.so.3: cannot open shared object file: No such file or directory
此时出现了个坑,报错:ImportError:libcblas.so.3:cannot open shared object file:No such file or directory
这个报错的意思是没有安装libcblas的库,此时安装Blas 的依赖项就解决了。安装libcblas库的命令是:
1 | sudo apt-get install libatlas-base-dev |
或者
1 | sudo apt-get install libgflags-dev |
From:https://my.oschina.net/u/4371092/blog/3406535