gpt4 book ai didi

python - 为什么从 openAI 导入 universe 模块时出现 "invalid syntax"错误

转载 作者:行者123 更新时间:2023-12-04 17:41:18 25 4
gpt4 key购买 nike

当我从 openAI 导入 universe 模块时。我收到以下错误。

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/__init__.py", line 22, in <module>
from universe import error, envs
File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/envs/__init__.py", line 1, in <module>
import universe.envs.vnc_env
File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/envs/vnc_env.py", line 11, in <module>
from universe.envs import diagnostics
File "/home/kunal/Desktop/OpenAi/openAI/lib/python3.7/site-packages/universe/envs/diagnostics.py", line 94
async = self.qr_pool.apply_async(self.method, (self._last_img, time.time(), available_at))
^
SyntaxError: invalid syntax

为什么我会收到这个?我该如何解决这个问题?

最佳答案

在 Ubuntu 16.04 和 18.04 上:

sudo apt-get install -y libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb ffmpeg curl patchelf libglfw3 libglfw3-dev cmake zlib1g zlib1g-dev swig

之后重新安装健身房:

git clone https://github.com/openai/gym.git
cd gym
pip install -e .

关于python - 为什么从 openAI 导入 universe 模块时出现 "invalid syntax"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54372092/

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