树莓派pip安装opencv报错,Could not find a version that satisfies the requirement cv2 (from versions: )No matching distribution found for cv2

Foreword


I error when using the pip install opencv-python

Could not find a version that satisfies the requirement opencv (from versions: ) No matching distribution found for opencv

Raspberry Pi is a mirror image of the default installation, not how equipped than other things. I look at the python version, python 2.7 version, ubuntu default image is loaded it python2. Analyze the reasons, it should be python2 version too long, can not be found to meet the needs of opencv version. I then upgraded to python2 python3 after installation, find a successful installation.

Specific operations


1. Run sudo apt-get install python3 command to install python3

sudo apt-get install python3

 

2. Perform python3 -V to see if the installation was successful python3

python3 -V

 

3. Do pip3 install opencv-python

pip3 install opencv-python

 

After installation Figure

 

 

4. Perform pip3 list PIP3 verify whether the install opencv-python

pip3 list
 
 
Inspection pip3 is installed opencv-python
(Check pip3 is installed opencv-python)

 

5. Enter python3 execute import cv2 as cv see if opencv-python successfully installed into python3

python3
import cv2 as cv 
 
 
View opencv-python is successfully installed into python3
(查看opencv-python 是否成功安装进python3)

 

此时出现了个坑,报错:ImportError:libcblas.so.3:cannot open shared object file:No such file or directory
这个报错的意思是没有安装libcblas的库,此时安装Blas 的依赖项就解决了。安装libcblas库的命令是:

sudo apt-get install libatlas-base-dev

sudo apt-get install libgflags-dev

sudo apt-get install libgoodle-glog-dev
sudo apt-get install liblmdb-dev
sudo apt-get install python
sudo apt-get install python-dev
sudo apt-get install python-numpy
sudo apt-get install ipython
sudo apt-get install ipython-notebook
sudo apt-get install python-sklearn
sudo apt-get install python-skimage
sudo apt-get install python-protobuf

 

Here demo command sudo apt-get install libatlas-base-dev

Installation of dependencies Blas
(Installation of dependencies Blas)

 

6. Go python3 executed again import cv2 as cv see opencv-python is successfully installed into python3
(if encountered pit fifth step is performed step VI)

 

The installation is complete
(The installation is complete)

Guess you like

Origin www.cnblogs.com/windowsxpxp/p/11456525.html