python3.7.6
调用from moviepy.editor import VideoFileClip
moviepy版本 1.0.3
昨天正常,第二天运行出现AttributeError: module ‘cv2‘ has no attribute ‘gapi_wip_gst_GStreamerPipeline‘
直接pip3.7 uninstall opencv-contrib-python
Found existing installation: opencv-contrib-python 4.6.0.66
Uninstalling opencv-contrib-python-4.6.0.66:
Would remove:
c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\cv2\*
c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\opencv_contrib_python-4.6.0.66.dist-info\*
Would not remove (might be manually added):
c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\cv2\cv2.cp37-win_amd64.pyd
c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\cv2\opencv_videoio_ffmpeg453_64.dll
Proceed (Y/n)? y
Successfully uninstalled opencv-contrib-python-4.6.0.66
卸载后,运行正常。
本文介绍了一种解决moviepy库与特定版本OpenCV在Python环境中出现的AttributeError问题的方法。通过卸载可能引起冲突的OpenCV版本,确保了moviepy能够正常运行。
3161

被折叠的 条评论
为什么被折叠?



