lix19937 / ocr

OCR related
0 stars 0 forks source link

AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' #5

Open lix19937 opened 1 year ago

lix19937 commented 1 year ago

AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'

(centerpoint) root@igs:~/nv_centerpoint# **pip install opencv-python==4.7.0.72**
Processing /root/.cache/pip/wheels/c6/31/a6/08cdd9fd7701b81f6f1904395d29e4782bded92e628db01778/opencv_python-4.7.0.72-cp36-cp36m-linux_x86_64.whl
Requirement already satisfied: numpy>=1.13.3; python_version < "3.7" in /root/anaconda3/envs/centerpoint/lib/python3.6/site-packages (from opencv-python==4.7.0.72) (1.19.5)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.7.0.72

(centerpoint) root@igs:~/nv_centerpoint# python ./check_cv.py 
['/root/nv_centerpoint', '/root/nv_centerpoint', '/root/nv_centerpoint/CenterPoint', '/root/nv_centerpoint/CenterPoint/nuscenes-devkit-master/python-sdk', '/root/anaconda3/envs/centerpoint/lib/python36.zip', '/root/anaconda3/envs/centerpoint/lib/python3.6', '/root/anaconda3/envs/centerpoint/lib/python3.6/lib-dynload', '/root/anaconda3/envs/centerpoint/lib/python3.6/site-packages']
4.7.0
<class 'type'>
(centerpoint) root@igs:~/nv_centerpoint# **pip install opencv-contrib-python==4.7.0.72**                                                                                     
Processing /root/.cache/pip/wheels/90/d1/fe/494e919e928609d45bebc0728396b03f848215db109c472d7a/opencv_contrib_python-4.7.0.72-cp36-cp36m-linux_x86_64.whl
Requirement already satisfied: numpy>=1.13.3; python_version < "3.7" in /root/anaconda3/envs/centerpoint/lib/python3.6/site-packages (from opencv-contrib-python==4.7.0.72) (1.19.5)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-4.7.0.72
(centerpoint) root@igs:~/nv_centerpoint# python ./check_cv.py 
Traceback (most recent call last):
  File "./check_cv.py", line 2, in <module>
    import cv2
  File "/root/anaconda3/envs/centerpoint/lib/python3.6/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/root/anaconda3/envs/centerpoint/lib/python3.6/site-packages/cv2/__init__.py", line 175, in bootstrap
    if __load_extra_py_code_for_module("cv2", submodule, DEBUG):
  File "/root/anaconda3/envs/centerpoint/lib/python3.6/site-packages/cv2/__init__.py", line 28, in __load_extra_py_code_for_module
    py_module = importlib.import_module(module_name)
  File "/root/anaconda3/envs/centerpoint/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/root/anaconda3/envs/centerpoint/lib/python3.6/site-packages/cv2/gapi/__init__.py", line 301, in <module>
    cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'  

https://stackoverflow.com/questions/64650877/install-of-opencv-python-headless-takes-a-long-time