vivek3141 / snake-gym

A gym environment for the game snake, with a tiled version. Contains implementations for NEAT and RL.
https://pypi.org/project/snake-gym/
MIT License
9 stars 3 forks source link

Unable to make gym environment #1

Closed ForrestCKoch closed 5 years ago

ForrestCKoch commented 5 years ago

Hi,

I am receiving an error when I try to make your gym environment in gym-0.10.9. Any ideas how I can fix this?

[GCC 8.2.1 20180831] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gym
>>> import snake_gym
>>> env = gym.make('snake-v0')
/usr/lib/python3.6/site-packages/gym/envs/registration.py:14: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  result = entry_point.load(False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 167, in make
    return registry.make(id)
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 119, in make
    env = spec.make()
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 85, in make
    cls = load(self._entry_point)
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 14, in load
    result = entry_point.load(False)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'snake_gym.envs'
vivek3141 commented 5 years ago

I believe I fixed it, try it now!

JaQtae commented 4 years ago

I have the same problem `runfile('C:/Users/jakob/OneDrive/Skrivebord/Python/kekw.py', wdir='C:/Users/jakob/OneDrive/Skrivebord/Python') Traceback (most recent call last):

File "C:\Users\jakob\OneDrive\Skrivebord\Python\kekw.py", line 7, in env = gym.make("snake-v0")

File "C:\Users\jakob\Anaconda3\lib\site-packages\gym\envs\registration.py", line 156, in make return registry.make(id, **kwargs)

File "C:\Users\jakob\Anaconda3\lib\site-packages\gym\envs\registration.py", line 101, in make env = spec.make(**kwargs)

File "C:\Users\jakob\Anaconda3\lib\site-packages\gym\envs\registration.py", line 72, in make cls = load(self.entry_point)

File "C:\Users\jakob\Anaconda3\lib\site-packages\gym\envs\registration.py", line 17, in load mod = importlib.import_module(mod_name)

File "C:\Users\jakob\Anaconda3\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1006, in _gcd_import

File "", line 983, in _find_and_load

File "", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'snake_gym.envs'`