centos8 安装opencv 失败

centos8 安装opencv 失败
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.
Collecting opencv-python
Downloading http://mirrors.tencentyun.com/pypi/packages/30/46/821920986c7ce5bae5518c1d490e520a9ab4cef51e3e54e35094dadf0d68/opencv-python-4.4.0.46.tar.gz (88.9MB)
100% |████████████████████████████████| 88.9MB 114.0MB/s
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.6/site-packages (from opencv-python)
Building wheels for collected packages: opencv-python
Running setup.py bdist_wheel for opencv-python … error
Complete output from command /usr/bin/python3.6 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-c03l9718/opencv-python/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/tmpimt53cofpip-wheel- --python-tag cp36:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py”, line 560, in setup
cmkr = cmaker.CMaker(cmake_executable)
File “/usr/local/lib/python3.6/site-packages/skbuild/cmaker.py”, line 95, in init
self.cmake_version = get_cmake_version(self.cmake_executable)
File “/usr/local/lib/python3.6/site-packages/skbuild/cmaker.py”, line 82, in get_cmake_version
“Problem with the CMake installation, aborting build. CMake executable is %s” % cmake_executable)

Problem with the CMake installation, aborting build. CMake executable is cmake


Failed building wheel for opencv-python
Running setup.py clean for opencv-python
Failed to build opencv-python
Installing collected packages: opencv-python
Running setup.py install for opencv-python … error
Complete output from command /usr/bin/python3.6 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-c03l9718/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-41us1pok-record/install-record.txt --single-version-externally-managed --compile:
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/skbuild/setuptools_wrap.py”, line 560, in setup
cmkr = cmaker.CMaker(cmake_executable)
File “/usr/local/lib/python3.6/site-packages/skbuild/cmaker.py”, line 95, in init
self.cmake_version = get_cmake_version(self.cmake_executable)
File “/usr/local/lib/python3.6/site-packages/skbuild/cmaker.py”, line 82, in get_cmake_version
“Problem with the CMake installation, aborting build. CMake executable is %s” % cmake_executable)

Problem with the CMake installation, aborting build. CMake executable is cmake

----------------------------------------

Command “/usr/bin/python3.6 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-c03l9718/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-41us1pok-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-c03l9718/opencv-python/

解决方案 pip3 install --upgrade pip 升级pip

安装成功
[root@VM-0-16-centos tr-master]# pip3 install opencv-python
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting opencv-python
Downloading http://mirrors.tencentyun.com/pypi/packages/6d/80/10a9ae6fa0940f25af32739d1dc6dfdbbdc79af3f04c5ea1a6de4303cd54/opencv_python-4.4.0.46-cp36-cp36m-manylinux2014_x86_64.whl (49.5 MB)
|████████████████████████████████| 49.5 MB 97 kB/s
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.6/site-packages (from opencv-python) (1.19.1)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.4.0.46

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值