Python opencv Aruco“没有名为'cv2.aruco'的模块" [英] Python opencv Aruco "No module named 'cv2.aruco'"

查看:2777
本文介绍了Python opencv Aruco“没有名为'cv2.aruco'的模块"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行带有Python 3.6.1,Anaconda 4.4.0(64位)的Ubuntu虚拟机.我正在尝试运行此网站上的代码. 当我尝试使用

I am running an Ubuntu virtual machine with, Python 3.6.1, Anaconda 4.4.0 (64-bit). I am trying to run the code on this website. When I try to use

import cv2.aruco

我得到:

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

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

Is this something I need to install or setup?

推荐答案

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

If cv2.aruco is not found, try installing opencv-contrib-python, such as by running the following (for the default Python installation):

pip install opencv-contrib-python

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

Or for a specific Python installation (in this case Python 3)

python3 -m pip install opencv-contrib-python

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

Then try re-running the script trying to access cv2.aruco.

这篇关于Python opencv Aruco“没有名为'cv2.aruco'的模块"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆