gpt4 book ai didi

python - 为什么 ImportError : No module named 'cv2' error come only for python3?

转载 作者:行者123 更新时间:2023-12-02 17:24:08 25 4
gpt4 key购买 nike

对于 python2,打开 cv 库成功添加。但是当我选择 python3 时,我不能。
默认版本是python3.5。在这里,我附上了屏幕截图。

ImportError: No module named 'cv2'



enter image description here

最佳答案

这似乎是安装问题。 python 解释器应该是所有可供使用的库的路径。默认情况下,包含 python 解释器的目录应该包含与该版本兼容的所有库。你应该试试这个命令which python3知道python3的安装路径,看看是否安装了cv2库。您需要引用 python 解释器如何找到第三方库。

关于python - 为什么 ImportError : No module named 'cv2' error come only for python3?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60369429/

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