Module Not Found Error: Gym Module Cannot be Located

To solve the issue, one should check the version of atari_py in PyCharm IDE as some versions are no longer functional or miss a file (ale_c.dll). It’s important to choose the correct version of everything when installing atari_py and gym with Python. The newest version of Gym 0.21.0 (0.20.0 and higher) uses ale-py which works differently compared to the previous version. It is suggested not to use env.render() and games are v5 (all versions below v5 are from atari_py).

Solution 1:

From my understanding, it appears that you are attempting to utilize the website

In order to execute the code


in the terminal, it is necessary to ensure that the


prompt is visible beforehand.

pip install gym

Once you execute


, you should then have the capability to run

import gym


Solution 2:

run this:

pip install gym

Then run your “import gym” again.

Solution 3:

I notice that you’re in the process of setting up a gym.

pip install gym 

is unnecessary.

Please, try:

import sys

The directory referred to is where the gym module is located.

Frequently Asked Questions

Posted in Uncategorized