开发环境树莓派4B,使用官方标配系统,系统自带python3,

pip3 install opencv-python

速度太慢,我就把他下面的链接贴到浏览器下载了whl文件,用这个安装的,完事之后报错下面,心累

pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.local/lib/python3.7/site-packages/cv2/__init__.py", line 3, in <module>
    from .cv2 import *
ImportError: /home/pi/.local/lib/python3.7/site-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8

然后我认为的解决方法,找到报错信息中的cv2.cpython-37m-arm-linux-gnueabihf.so这个文件,改名cv2.so,用命令复制一份最好,然后

pip3 unistall opencv-python 

 

 

 

 

 

 

 

 

 

 

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐