错误信息:Problem with the CMake installation, aborting build. CMake executable is cmake

pip3 install opencv-python
Collecting opencv-python
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/30/46/821920986c7ce5bae5518c1d490e520a9ab4cef51e3e54e35094dadf0d68/opencv-python-4.4.0.46.tar.gz (88.9MB)
    100% |████████████████████████████████| 88.9MB 40.6MB/s 
Requirement already satisfied: numpy>=1.13.3 in /usr/python3/lib/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/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-um8_f3cq/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpm196cj7gpip-wheel- --python-tag cp36:
  /usr/python3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  Traceback (most recent call last):
    File "/usr/python3/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
      cmkr = cmaker.CMaker(cmake_executable)
    File "/usr/python3/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
      self.cmake_version = get_cmake_version(self.cmake_executable)
    File "/usr/python3/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/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-um8_f3cq/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-bwaolfe7-record/install-record.txt --single-version-externally-managed --compile:
    /usr/python3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    Traceback (most recent call last):
      File "/usr/python3/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
        cmkr = cmaker.CMaker(cmake_executable)
      File "/usr/python3/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
        self.cmake_version = get_cmake_version(self.cmake_executable)
      File "/usr/python3/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/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-um8_f3cq/opencv-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-bwaolfe7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-um8_f3cq/opencv-python/
You are using pip version 9.0.1, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

这里意思就是CMake 没有安装好
安装方法看我另一片文章: Centos 安装CMake
安装好cmake重新运行pip3 install opencv-python 就好了

python3安装文章

文章来源于互联网,如有雷同请联系站长删除:centos Python 安装 opencv-python 报错

发表评论