1

While trying to load the following Openai-gym environment:

import gym
env = gym.make('Breakout-v4', render_mode='human')

I'm encountering this error: FileNotFoundError: Could not find module 'C:\Users\...\atari_py\ale_interface\ale_c.dll'. Try using the full path with constructor syntax.

I am in windows, using python 3.8.0

What I have tried:

  • Following this solution, nothing changed.

  • When trying to follow that solution, looking into __init__.py, I have encountered the problem: import "nt" could not be resolved

  • Trying to replace __init__.py file with this file, as they were not the same. The same problem still occurs.

I suspect that this is the root cause of the problem.

Am I right? How can it be solved?

Edit: the problem was rooted in gym version. I have updated the version and solved the issue.

yuvala
  • 31
  • 4
  • Which OS are you on? How have you installed `gym`? What is the full traceback to the error? – AKX Oct 06 '22 at 12:50
  • As an aside, it's pretty much a terrible idea to replace library files such as `ctypes/__init__.py` with other versions. – AKX Oct 06 '22 at 12:51
  • 1
    @AKX It's quite clearly Windows from the error message. The installation instructions can be found [here](https://github.com/openai/gym/issues/1726). – erip Oct 06 '22 at 12:51
  • 1
    I.e. the issue probably has nothing to do with ctypes being broken, but atari-py being partially? installed. – AKX Oct 06 '22 at 12:56
  • @AKX You were right. it wasn't a problem with ctypes. it was a problem with the version of gym, who was surprisingly at 0.15.7 (probobaly because of baselines version), I have updated the version and got the solution. – yuvala Oct 06 '22 at 13:27

0 Answers0