已解決【partially initialized module ‘cv2’ has no attribute ‘gapi_wip_gst_GStreamerPipeline’】
在嘗試了幾乎所有網(wǎng)上能找到的辦法之后,本來已經(jīng)放棄了,但是過了幾天抱著試一試的心態(tài)又看了一眼stackoverflow,發(fā)現(xiàn)有一個很臟但非常有效的解決辦法。
產(chǎn)生問題的根源在于/site-packages/cv2/gapi/__init__.py
的最后一行:
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
我們要做的事情就是打開這個文件,并將最后一行注釋掉,問題解決。。。文章來源:http://www.zghlxwxcb.cn/news/detail-536786.html
參考鏈接:https://stackoverflow.com/questions/72732256/cannot-import-opencv-because-of-circular-import文章來源地址http://www.zghlxwxcb.cn/news/detail-536786.html
到了這里,關(guān)于已解決【partially initialized module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘】的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!