美文网首页
python 在centos下安装cv2

python 在centos下安装cv2

作者: 代瑶 | 来源:发表于2021-03-31 10:39 被阅读0次

pip3 install opencv-python 在使用pip3安装时报错.

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-jy5xjibe/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-chevs4so-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-jy5xjibe/opencv-python/

python3 -m pip list 查看list发现有一个pip但是版本特别低


image.png

先升级下

> python3 -m pip install --upgrade pip
> [#]Successfully installed pip-21.0.1
>sudo pip3 install opencv-python
> [#]Successfully installed opencv-python-4.5.1.48

安装成功

相关文章

网友评论

      本文标题:python 在centos下安装cv2

      本文链接:https://www.haomeiwen.com/subject/dbsohltx.html