内容简介:据说,网上有人安装了 7 个月才在树莓派上把 OpenCv 安装成功,然后我就想挑战以下,能不能在七分钟内搞定。安装基础组件:
前言
据说,网上有人安装了 7 个月才在树莓派上把 OpenCv 安装成功,然后我就想挑战以下,能不能在七分钟内搞定。
开始
安装基础组件:
sudo apt-get update sudo apt-get install libjpeg-dev libatlas-base-dev libjpeg-dev libtiff5-dev libpng12-dev libqtgui4 libqt4-test libjasper-dev
然后:
sudo pip3 install opencv-python
一般情况,你是不可能安装成功的,99.999% 会出现以下错误:
Collecting opencv-python Downloading https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl (7.4MB) 45% |██████████████▍ | 3.3MB 15kB/s eta 0:04:20 THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. opencv-python from https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl#sha256=329d9d9fdd62b93d44a485aeaab4602c6f5b8555ea8bcc7dbcdc62c90cfe2c3f: Expected sha256 329d9d9fdd62b93d44a485aeaab4602c6f5b8555ea8bcc7dbcdc62c90cfe2c3f Got 869c7994c40b84ac09f244f768db9269d52d3265d376441e8516a47f24711ef2
这可能是由于网速太慢了,没有下载完整的文件,所以不完整的文件的md5和期望的不一样。
我们首先下载 whl 文件到本地:
# 浏览器直接访问就可以 https://www.piwheels.org/simple/opencv-python/opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl
然后上传到树莓派,使用以下命令安装:
sudo pip3 install opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl
如果出现以下代码,说明安装成功:
Processing ./opencv_python-3.4.4.19-cp35-cp35m-linux_armv7l.whl Requirement already satisfied: numpy>=1.12.1 in /usr/lib/python3/dist-packages (from opencv-python==3.4.4.19) Installing collected packages: opencv-python Successfully installed opencv-python-3.4.4.19
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 树莓派安装Docker
- 树莓派安装go
- 树莓派编译安装最新Golang
- 树莓派 3 上安装 Swift 3.1.1
- Notadd Beta5_fix1 优化性能,支持树莓派安装
- [树莓派]树莓派的入门教程
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Cascading Style Sheets 2.0 Programmer's Reference
Eric A. Meyer / McGraw-Hill Osborne Media / 2001-03-20 / USD 19.99
The most authoritative quick reference available for CSS programmers. This handy resource gives you programming essentials at your fingertips, including all the new tags and features in CSS 2.0. You'l......一起来看看 《Cascading Style Sheets 2.0 Programmer's Reference》 这本书的介绍吧!