google-deepmind / google-deepmind/dm_control

viewer not working on mac osx

未关闭
#276 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
4.7k
派生
764
PR 合并指标
30 天内没有已合并 PR

描述

Using the latest install for both dm_control and mujoco via pypi, the viewer can not render a window on OSX (intel chip).

Script:

```
from dm_control import suite
from dm_control import viewer
import numpy as np

env = suite.load(domain_name="point_mass", task_name="easy")
action_spec = env.action_spec()

# Define a uniform random policy.
def random_policy(time_step):
del time_step # Unused.
return np.random.uniform(low=action_spec.minimum,
high=action_spec.maximum,
size=action_spec.shape)

# Launch the viewer application.
viewer.launch(env, policy=random_policy)
```

Error output:

```
script_render_dm.py 51
"/Users/user/mjc/script_render_dm.py", line 51
viewer.launch(env, policy=random_policy)

__init__.py 39 launch
"/Users/user/.virtualenvs/p39/lib/python3.9/site-packages/dm_control/viewer/__init__.py", line 39
app = application.Application(title=title, width=width, height=height)

application.py 187 __init__
"/Users/user/.virtualenvs/p39/lib/python3.9/site-packages/dm_control/viewer/application.py", line 187
self._window = gui.RenderWindow(width, height, title)

__init__.py 34 ErrorRenderWindow
"/Users/user/.virtualenvs/p39/lib/python3.9/site-packages/dm_control/viewer/gui/__init__.py", line 34
raise ImportError(

ImportError:
Cannot create a window because no windowing system could be imported
```

贡献指南

打开贡献指南

调研方向

Reproduce the failure with script_render_dm.py and the provided dm_control viewer example. Read viewer/__init__.py, viewer/application.py, and viewer/gui/__init__.py around the reported traceback; done means the viewer creates and renders a window on Intel macOS without the ImportError.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
desktop
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。