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
安装成功
网友评论