gpt4 book ai didi

python-3.x - Python opencv Aruco "No module named ' cv2.aruco'”

转载 作者:太空宇宙 更新时间:2023-11-03 20:44:44 24 4
gpt4 key购买 nike

我正在运行一个 Ubuntu 虚拟机,Python 3.6.1,Anaconda 4.4.0(64 位)。我正在尝试运行 the code on this website .当我尝试使用

导入cv2.aruco

我得到:

>>> import cv2.aruco
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2.aruco'

这是我需要安装或设置的东西吗?

最佳答案

如果未找到 cv2.aruco,请尝试安装 opencv-contrib-python,例如通过运行以下命令(对于默认 Python 安装):

pip install opencv-contrib-python

或针对特定的 Python 安装(在本例中为 Python 3)

python3 -m pip install opencv-contrib-python

然后尝试重新运行脚本以访问 cv2.aruco

关于python-3.x - Python opencv Aruco "No module named ' cv2.aruco'”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45972357/

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