openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.46k stars 8.59k forks source link

atari Environment error #3168

Open alstjr510 opened 1 year ago

alstjr510 commented 1 year ago

An error appears when I try to run riverride in atari. The remaining atari games do not run with the same error:

[ My code : import gym env = gym.make("Riverraid-v4",render_mode = 'human') env.reset() env.render() ]

[error: File c:\Users\Jang min seock\AppData\Local\Programs\Python\Python38\lib\site-packages\gym\envs\registration.py:640, in make(id, max_episode_steps, autoreset, apply_api_compatibility, disable_env_checker, kwargs) 637 render_mode = None 639 try: --> 640 env = env_creator(_kwargs) 641 except TypeError as e: 642 if ( 643 str(e).find("got an unexpected keyword argument 'render_mode'") >= 0 644 and apply_human_rendering 645 ):

File c:\Users\Jang min seock\AppData\Local\Programs\Python\Python38\lib\site-packages\ale_py\env\gym.py:155, in AtariEnv.init(self, game, mode, difficulty, obs_type, frameskip, repeat_action_probability, full_action_space, max_num_frames_per_episode, render_mode) 152 self.ale.setBool("sound", True) 154 # Seed + Load --> 155 self.seed() ... ---> 13 import libtorrent as lt 15 from typing import Dict 16 from collections import namedtuple

ImportError: DLL load failed while importing libtorrent: The specified module was not found.. ]

my gym version is 0.26.2

jjshoots commented 1 year ago

Hiya, it seems you are missing the OpenSSL DLLs for Windows. This is expected since Gymnasium does not have official support for Windows. That said, an easy fix which should solve your problem is to download the required DLLs from here. Dependingn on your CPU architecture, you will need Win64 OpenSSL v1.1.1s or Win32 OpenSSL v1.1.1s.

jjshoots commented 1 year ago

@alstjr510 Could you confirm if your issue has been fixed?

alstjr510 commented 1 year ago

@jjshoots Oh, I'm sorry. I tried to do it the way you told me, but I couldn't. I solved the problem in a different way!

(Different way)

import gym from ale_py import ALEInterface from ale_py.roms import Riverraid

ale = ALEInterface() ale.loadROM(Riverraid) env = gym.make('ALE/Riverraid-v5',render_mode = 'rgb_array')

I succeeded in building the environment using the code above.

xiezhipeng-git commented 1 year ago

Hiya, it seems you are missing the OpenSSL DLLs for Windows. This is expected since Gymnasium does not have official support for Windows. That said, an easy fix which should solve your problem is to download the required DLLs from here. Dependingn on your CPU architecture, you will need or .Win64 OpenSSL v1.1.1s``Win32 OpenSSL v1.1.1s

I have similar error https://github.com/arvidn/libtorrent/issues/7245 https://github.com/Farama-Foundation/AutoROM/issues/23 And I try install openssl and add envpath It doesn't work

eftales commented 1 year ago

您好,您似乎缺少适用于 Windows 的 OpenSSL DLL。这是预料之中的,因为 Gymnasium 没有对 Windows 的官方支持。也就是说,应该可以解决您的问题的一个简单修复方法是从此处下载所需的 DLL 。根据您的 CPU 架构,您将需要Win64 OpenSSL v1.1.1sWin32 OpenSSL v1.1.1s.

It work for me. The version of the program is very important. It must be v1.1.1s .

xiezhipeng-git commented 1 year ago

您好,您似乎缺少适用于 Windows 的 OpenSSL DLL。这是预料之中的,因为 Gymnasium 没有对 Windows 的官方支持。也就是说,应该可以解决您的问题的一个简单修复方法是从此处下载所需的 DLL 。根据您的 CPU 架构,您将需要Win64 OpenSSL v1.1.1sWin32 OpenSSL v1.1.1s.

It work for me. The version of the program is very important. It must be v1.1.1s .

What is your version of python. It seems that only 3.9 and 3.10 do not work

eftales commented 1 year ago

您好,您似乎缺少适用于 Windows 的 OpenSSL DLL。这是预料之中的,因为 Gymnasium 没有对 Windows 的官方支持。也就是说,应该可以解决您的问题的一个简单修复方法是从此处下载所需的 DLL 。根据您的 CPU 架构,您将需要Win64 OpenSSL v1.1.1sWin32 OpenSSL v1.1.1s.

It work for me. The version of the program is very important. It must be v1.1.1s .

What is your version of python. It seems that only 3.9 and 3.10 do not work

3.8.0

pseudo-rnd-thoughts commented 1 year ago

What is the exact stack trace for your error?