我正在使用Qt和opencv运行一个创建UI的脚本。然而,这是一个奇怪的错误
python3 dashboard.py
QObject::moveToThread: Current thread (0xaffdf0) is not the object's thread (0x552f790).
Cannot move to target thread (0xaffdf0)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/aevas/Desktop/pyenvs/new
我已经用‘opencv2安装opencv’命令安装了pip3。之后,我从' python3‘命令打开了python3终端。然后输入导入cv2来测试安装。命令行给了我一个错误。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/cv2/__init__.py", line 3, in <module>
from .cv2 import *
ImportError: /usr/lib
我一直在尝试从Pycharm和终端安装OpenCV和cv2,建议使用:
pip install --user opencv
pip install --user cv2
但是我得到了下面的错误:
Collecting opencv
Could not find a version that satisfies the requirement opencv (from versions: )
No matching distribution found for opencv
和
Collecting cv2
Could not find a version that satisfies
我已经在我的Mac中安装了OpenCV 3.1,cv2也是通过pip install cv2安装的。
vinllen@ $ pip install cv2
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already satisfied (use --upgrade to upgrade): cv2 in /usr/
我试图为我在笔记本电脑上做的每一个深入学习项目建立虚拟环境,这样我安装的每一个包,比如numpy、matplotlib、opencv等等,都只能安装在我的笔记本电脑上。现在,问题是我使用source ENV_NAME/bin/activate激活了虚拟环境,当我在笔记本中安装了cv2之后,在笔记本中导入像cv2这样的库时,里面写着“ModuleNotFoundError: No module named 'cv2'”--请看下面的屏幕截图。但是,当我在全球范围内禁用该环境并在我的笔记本上安装cv2,然后尝试导入cv2时,它就可以正常工作了。谁能告诉我为什么吗?
我已经在Linux上安装了OpenCV,我可以在python中导入它
(cv_env)➜ cv_env python
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
>>> import cv2
>>> import n
我希望有人能帮我一下我的程序,我已经安装了python3.6amd64,并将它添加到path中,然后使用"pip“成功地安装了OpenCV3.2。但是,当我试图导入cv2 (opencv库)时,这里有一个错误:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv2
ImportError: DLL load failed: The module specified is not found.
安装cv2时出错
$ pip install cv2
ERROR: Introspect error on :1.1082:/modules/kwalletd5: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
WARNING: Keyring is skipped due to an exception: Failed to open keyring: org.freedesk
当我使用OpenCV ( ,brew)安装python -c "import cv2"时,每当我运行这个命令来测试python -c "import cv2"时,就会遇到这个问题。
RuntimeError: module compiled against API version 9 but this version of numpy is 6
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: num