最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

pycharm安裝opencv-python報(bào)錯(cuò)的解決

 更新時(shí)間:2023年07月04日 15:24:02   作者:dsdasun  
本文主要介紹了pycharm安裝opencv-python報(bào)錯(cuò)的解決,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

問(wèn)題一 通過(guò)pycharm中的Terminal窗口安裝opencv-python錯(cuò)誤如下:

上圖所示為部分錯(cuò)誤,全部錯(cuò)誤如下:

  Building wheel for opencv-contrib-python (PEP 517) ... error
  ERROR: Complete output from command 'D:\anzhuanglujing\Anaconda\python.exe' 'D:\anzhuanglujing\Anaconda\lib\site
-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\Administrator\AppData\Local\Temp\tmpjqvqd9_8':
  ERROR: Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Ninja
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Visual Studio 17 2022
  
    could not find any instance of Visual Studio.
  
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Ninja
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Visual Studio 16 2019
  
    could not find any instance of Visual Studio.
  
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Ninja
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      Visual Studio 15 2017
  
    could not find any instance of Visual Studio.
  
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      NMake Makefiles
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      NMake Makefiles
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  Not searching for unused variables given on the command line.
  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator
  
      NMake Makefiles
  
    does not support platform specification, but platform
  
      x64
  
    was specified.
  
  
  -- Configuring incomplete, errors occurred!
  See also "C:/Users/Administrator/AppData/Local/Temp/pip-install-bc_r227f/opencv-contrib-python/_cmake_test_compi
le/build/CMakeFiles/CMakeOutput.log".
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 17 2022 x64 v143)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 17 2022 x64 v143)" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 17 2022 x64 v143" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 17 2022 x64 v143" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v142)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 16 2019 x64 v142)" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 16 2019 x64 v142" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 16 2019 x64 v142" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "Visual Studio 15 2017 x64 v141" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 17 2022 x64 v143)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 17 2022 x64 v143)" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v142)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 16 2019 x64 v142)" generator - failure
  --------------------------------------------------------------------------------
  
  
  
  --------------------------------------------------------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying "NMake Makefiles (Visual Studio 15 2017 x64 v141)" generator - failure
  --------------------------------------------------------------------------------
  
  ********************************************************************************
  scikit-build could not get a working generator for your system. Aborting build.
  
  Building windows wheels for Python 3.7 requires Microsoft Visual Studio 2022.
  Get it with "Visual Studio 2017":
  
    https://visualstudio.microsoft.com/vs/
  
  Or with "Visual Studio 2019":
  
    https://visualstudio.microsoft.com/vs/
  
  Or with "Visual Studio 2022":
  
    https://visualstudio.microsoft.com/vs/
  
  ********************************************************************************
  ----------------------------------------
  ERROR: Failed building wheel for opencv-contrib-python
  Running setup.py clean for opencv-contrib-python
Failed to build opencv-contrib-python
ERROR: Could not build wheels for opencv-contrib-python which use PEP 517 and cannot be installed directly
 

解決辦法:升級(jí)pip版本,命令如下:python -m pip install --upgrade pip

升級(jí)后顯示如下圖所示:

安裝opencv-python,

命令如下:pip install opencv-contrib-python -ihttps://pypi.tuna.tsinghua.edu.cn/simple

安裝成功后結(jié)果如下圖所示:

問(wèn)題二用默認(rèn)源安裝庫(kù),一般來(lái)說(shuō)下載的速度很慢,更何況opencv這種比較大的庫(kù),所以我使用的是豆瓣源(當(dāng)然你也可以使用清華源…)

安裝語(yǔ)句

pip install opencv-python -i https://pypi.doubanio.com/simple/

報(bào)錯(cuò)

解決方案一

遇到這個(gè)問(wèn)題之后,我在網(wǎng)上查閱解決方法,有文章說(shuō)是需要安裝cmake(但是其實(shí)沒(méi)有實(shí)際解決,嚴(yán)格按照文章步驟操作,最后將會(huì)成功安裝opencv)

安裝語(yǔ)句

pip install cmake -i https://pypi.doubanio.com/simple/

以上是cmake安裝成功的信息提示

問(wèn)題再現(xiàn)當(dāng)安裝完cmake之后,我又重新使用pip安裝opencv,但是依舊沒(méi)能安裝成功 ?? 依然還是與問(wèn)題一同樣的報(bào)錯(cuò)。于是,我又重新查閱網(wǎng)上資料,得到的解決方案是,需要更新pip工具包。

解決方案二

需要修復(fù)pip。

修復(fù)語(yǔ)句

python -m ensurepip

安裝成功后,再重新更新pip工具包

python -m pip install --upgrade pip setuptools wheel

這時(shí)候發(fā)現(xiàn)pip工具包已經(jīng)更新成功。

緊接著,再次嘗試更新opencv。

pip install opencv-python -i https://pypi.doubanio.com/simple/

發(fā)現(xiàn)opencv也已經(jīng)安裝成功!問(wèn)題解決~ ??

 到此這篇關(guān)于pycharm安裝opencv-python報(bào)錯(cuò)的解決的文章就介紹到這了,更多相關(guān)pycharm安裝opencv-python報(bào)錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • Opencv識(shí)別圖片顏色并繪制輪廓實(shí)現(xiàn)代碼示例

    Opencv識(shí)別圖片顏色并繪制輪廓實(shí)現(xiàn)代碼示例

    這篇文章主要給大家介紹了關(guān)于Opencv識(shí)別圖片顏色并繪制輪廓實(shí)現(xiàn)的相關(guān)資料,實(shí)驗(yàn)代碼和現(xiàn)象展示了如何從原始圖像中識(shí)別和突出顯示特定顏色區(qū)域,并通過(guò)圖像處理技術(shù)增強(qiáng)識(shí)別效果,需要的朋友可以參考下
    2024-12-12
  • python中random模塊詳解

    python中random模塊詳解

    Python中的random模塊用于生成隨機(jī)數(shù),它提供了很多函數(shù),本文給大家分享常用函數(shù)總結(jié),感興趣的朋友跟隨小編一起看看吧
    2021-03-03
  • 使用Python實(shí)現(xiàn)將多表分批次從數(shù)據(jù)庫(kù)導(dǎo)出到Excel

    使用Python實(shí)現(xiàn)將多表分批次從數(shù)據(jù)庫(kù)導(dǎo)出到Excel

    這篇文章主要介紹了使用Python實(shí)現(xiàn)將多表分批次從數(shù)據(jù)庫(kù)導(dǎo)出到Excel,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-05-05
  • Python (Win)readline和tab補(bǔ)全的安裝方法

    Python (Win)readline和tab補(bǔ)全的安裝方法

    今天小編就為大家分享一篇Python (Win)readline和tab補(bǔ)全的安裝方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2019-08-08
  • 解決Python3 struct報(bào)錯(cuò)argument for 's' must be a bytes object

    解決Python3 struct報(bào)錯(cuò)argument for 's'&

    這篇文章主要為大家介紹了解決Python3 struct報(bào)錯(cuò)argument for 's' must be a bytes object方法詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-08-08
  • Python遞歸時(shí)間復(fù)雜度

    Python遞歸時(shí)間復(fù)雜度

    這篇文章主要介紹了Python遞歸時(shí)間復(fù)雜度,時(shí)間復(fù)雜度一般認(rèn)為O(logn),但遞歸算法的時(shí)間復(fù)雜度本質(zhì)上是要看遞歸的次數(shù),每次遞歸中的操作次數(shù),下面文章詳細(xì)介紹,需要的朋友可以參考一下
    2022-03-03
  • 用python爬蟲(chóng)爬取CSDN博主信息

    用python爬蟲(chóng)爬取CSDN博主信息

    這篇文章主要介紹了如何用python爬蟲(chóng)獲取CSDN博主信息的方法,原理和代碼寫(xiě)的非常詳細(xì),對(duì)大家學(xué)習(xí)Python爬取很有用處,有需要的朋友可以和小編一起看一下
    2021-04-04
  • python常用運(yùn)維腳本實(shí)例小結(jié)

    python常用運(yùn)維腳本實(shí)例小結(jié)

    這篇文章主要介紹了python常用運(yùn)維腳本實(shí)例小結(jié),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-02-02
  • Python多進(jìn)程同步Lock、Semaphore、Event實(shí)例

    Python多進(jìn)程同步Lock、Semaphore、Event實(shí)例

    這篇文章主要介紹了Python多進(jìn)程同步Lock、Semaphore、Event實(shí)例,Lock用來(lái)避免訪問(wèn)沖突、Semaphore用來(lái)控制對(duì)共享資源的訪問(wèn)數(shù)量、Event用來(lái)實(shí)現(xiàn)進(jìn)程間同步通信,需要的朋友可以參考下
    2014-11-11
  • python opencv圖像處理(素描、懷舊、光照、流年、濾鏡 原理及實(shí)現(xiàn))

    python opencv圖像處理(素描、懷舊、光照、流年、濾鏡 原理及實(shí)現(xiàn))

    這篇文章主要介紹了python 基于opencv對(duì)圖像進(jìn)行各種處理,幫助大家更好的理解和使用python,感興趣的朋友可以了解下
    2020-12-12

最新評(píng)論

康马县| 广南县| 虞城县| 铜梁县| 安庆市| 绩溪县| 启东市| 灵石县| 佛教| 呼玛县| 万山特区| 青海省| 航空| 烟台市| 屯昌县| 双鸭山市| 黔南| 阿克陶县| 郸城县| 奉节县| 民和| 兰溪市| 安国市| 玛纳斯县| 绥化市| 青神县| 海门市| 韶关市| 韶关市| 永德县| 邵阳市| 舟曲县| 太和县| 建德市| 柳江县| 乌鲁木齐市| 金湖县| 苍南县| 望江县| 双峰县| 固安县|