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

pycharm安裝opencv-python報錯的解決

 更新時間:2023年07月04日 15:24:02   作者:dsdasun  
本文主要介紹了pycharm安裝opencv-python報錯的解決,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧

問題一 通過pycharm中的Terminal窗口安裝opencv-python錯誤如下:

上圖所示為部分錯誤,全部錯誤如下:

  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
 

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

升級后顯示如下圖所示:

安裝opencv-python,

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

安裝成功后結果如下圖所示:

問題二用默認源安裝庫,一般來說下載的速度很慢,更何況opencv這種比較大的庫,所以我使用的是豆瓣源(當然你也可以使用清華源…)

安裝語句

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

報錯

解決方案一

遇到這個問題之后,我在網(wǎng)上查閱解決方法,有文章說是需要安裝cmake(但是其實沒有實際解決,嚴格按照文章步驟操作,最后將會成功安裝opencv)

安裝語句

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

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

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

解決方案二

需要修復pip。

修復語句

python -m ensurepip

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

python -m pip install --upgrade pip setuptools wheel

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

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

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

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

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

相關文章

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

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

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

    python中random模塊詳解

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

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

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

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

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

    解決Python3 struct報錯argument for 's'&

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

    Python遞歸時間復雜度

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

    用python爬蟲爬取CSDN博主信息

    這篇文章主要介紹了如何用python爬蟲獲取CSDN博主信息的方法,原理和代碼寫的非常詳細,對大家學習Python爬取很有用處,有需要的朋友可以和小編一起看一下
    2021-04-04
  • python常用運維腳本實例小結

    python常用運維腳本實例小結

    這篇文章主要介紹了python常用運維腳本實例小結,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-02-02
  • Python多進程同步Lock、Semaphore、Event實例

    Python多進程同步Lock、Semaphore、Event實例

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

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

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

最新評論

库尔勒市| 麻阳| 宝鸡市| 分宜县| 双流县| 南皮县| 昌平区| 油尖旺区| 抚顺县| 莱芜市| 江安县| 保亭| 宜兰市| 攀枝花市| 柘荣县| 洪雅县| 桂林市| 江安县| 尚志市| 前郭尔| 宁蒗| 白朗县| 阳江市| 铜鼓县| 勃利县| 灵寿县| 普安县| 延寿县| 玉山县| 广昌县| 长寿区| 五常市| 临沭县| 连州市| 柞水县| 万年县| 会同县| 太仆寺旗| 鄂州市| 股票| 威远县|