Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named client #18

Open
riccitensor opened this issue Oct 30, 2017 · 2 comments
Open

No module named client #18

riccitensor opened this issue Oct 30, 2017 · 2 comments

Comments

@riccitensor
Copy link

riccitensor commented Oct 30, 2017

I am having this on Ubuntu 16.4, with Python 2.7.

  • when installing using gym-pull
  File "riccitensor_doom.py", line 2, in <module>
    import gym_pull
  File "/usr/local/lib/python2.7/dist-packages/gym_pull/__init__.py", line 40, in <module>
    import gym_pull.scoreboard.api
  File "/usr/local/lib/python2.7/dist-packages/gym_pull/scoreboard/api.py", line 3, in <module>
    from gym.scoreboard.client import resource, util
ImportError: No module named client

  • when installing gym-doom

gamer@gamer:~/Documents/gym$ python doom2.py 
Traceback (most recent call last):
  File "doom2.py", line 2, in <module>
    import ppaquette_gym_doom
  File "/usr/local/lib/python2.7/dist-packages/ppaquette_gym_doom/__init__.py", line 2, in <module>
    from gym.scoreboard.registration import add_task, add_group
ImportError: No module named registration

@riccitensor riccitensor changed the title No module named client (gym_pull installation) No module named client Oct 30, 2017
@jpearce84
Copy link

jpearce84 commented Oct 30, 2017 via email

@ShreekantSaurabh
Copy link

To resolve this issue :

  1. Find 'gym' folder in your PC, inside that find one more 'gym' or 'scoreboard' folder
  2. If "registration.py" is missing inside scoreboard folder then create a python file with "registration.py" and paste the below code in the py file:

import collections
import gym.envs
import logging

logger = logging.getLogger(name)

class RegistrationError(Exception):
pass

class Registry(object):
def init(self):
self.groups = collections.OrderedDict()
self.envs = collections.OrderedDict()
self.benchmarks = collections.OrderedDict()

def env(self, id):
    return self.envs[id]

def add_group(self, id, name, description, universe=False):
    self.groups[id] = {
        'id': id,
        'name': name,
        'description': description,
        'envs': [],
        'universe': universe,
    }

def add_task(self, id, group, summary=None, description=None, background=None, deprecated=False, experimental=False, contributor=None):
    self.envs[id] = {
        'group': group,
        'id': id,
        'summary': summary,
        'description': description,
        'background': background,
        'deprecated': deprecated,
        'experimental': experimental,
        'contributor': contributor,
    }
    if not deprecated:
        self.groups[group]['envs'].append(id)

def add_benchmark(self, id, name, description, unavailable):
    self.benchmarks[id] = {
        'id': id,
        'name': name,
        'description': description,
        'unavailable': unavailable,
    }

def finalize(self, strict=False):
    # We used to check whether the scoreboard and environment ID
    # registries matched here. However, we now support various
    # registrations living in various repos, so this is less
    # important.
    pass

registry = Registry()
add_group = registry.add_group
add_task = registry.add_task
add_benchmark = registry.add_benchmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants