首页 > 解决方案 > habitat-api 快速启动无法正常运行 - qt.qpa.plugin: 在“”中找不到 Qt 平台插件“cocoa”

问题描述

我目前正在尝试从habitat-api运行该示例,但是当我运行该示例时它无法正常运行。

我修复了一个未在代码中更新的问题("pointgoal"应该是"pointgoal_with_gps_compass"

这是终端在运行后给我的python testActions.py

2020-03-13 17:29:37,024 Initializing dataset PointNav-v1
2020-03-13 17:29:37,217 initializing sim Sim-v0
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0313 17:29:37.234107 303062464 SceneGraph.h:92] Created DrawableGroup: 
Renderer: Intel(R) Iris(TM) Plus Graphics 640 by Intel Inc.
OpenGL version: 4.1 INTEL-14.4.23
Using optional features:
    GL_ARB_ES2_compatibility
    GL_ARB_separate_shader_objects
    GL_ARB_texture_filter_anisotropic
    GL_ARB_texture_storage
    GL_ARB_vertex_array_object
    GL_EXT_debug_label
    GL_EXT_debug_marker
Using driver workarounds:
    no-layout-qualifiers-on-old-glsl
I0313 17:29:37.395491 303062464 ResourceManager.cpp:1072] Importing Basis files as BC3
W0313 17:29:38.644949 303062464 Simulator.cpp:140] :
---
 The active scene does not contain semantic annotations. 
---
I0313 17:29:38.651930 10376 simulator.py:142] Loaded navmesh data/scene_datasets/habitat-test-scenes/skokloster-castle.navmesh
2020-03-13 17:29:38,737 Initializing task Nav-v0
Environment creation successful
Destination, distance: 5.883259, theta(radians): -0.00
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

zsh: abort      python testActions.py

我认为代码中存在一些问题。我曾尝试在 GitHub 存储库(问题 #330)上询问,但仍在等待查看错误是否存在。有人告诉我错误是我安装 OpenCV 造成的。

标签: pythonmacosqtpyqtartificial-intelligence

解决方案


我通过使用旧版本的opencv-python

pip unistall opencv-python
pip install opencv-python==4.1.0.25

推荐阅读