gpt4 book ai didi

python - OpenCV导入错误

转载 作者:太空宇宙 更新时间:2023-11-03 21:58:25 25 4
gpt4 key购买 nike

将cv2库导入python后,出现如下错误:

Traceback(most recent call):
file"<stdin>",line1,in <module>
Attribute Error:'module' object has no attribute '_version_'

我该怎么办?

最佳答案

你想要 __version__ ,而不是 _version_ ;)

import cv2;
>>> cv2._version_
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '_version_'
>>> cv2.__version__
'3.0.0-dev'
>>>

关于python - OpenCV导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27818742/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com