prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Box2d won't find some RAND_LIMIT_swigconstant
  Hello!
  
  It's probably some silly mistake on my side, but i wasn't able to fix by random lever pulling, as usual.
  
  Installing Box2d as in instuctions (using `pip install -e .[all]`) will throw error when trying to use some of Box2D examples.
  
  Code that reproduces the issue:
  
  ```
  import gym
  atari = gym.make('LunarLander-v0')
  atari.reset()
  ```
  
  ```
  [2016-05-16 02:14:25,430] Making new env: LunarLander-v0
  
  ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  <ipython-input-1-f89e78f4410b> in <module>()
        1 import gym
  ----> 2 atari = gym.make('LunarLander-v0')
        3 atari.reset()
        4 #plt.imshow(atari.render('rgb_array'))
  
  /home/jheuristic/yozhik/gym/gym/envs/registration.pyc in make(self, id)
       77         logger.info('Making new env: %s', id)
       78         spec = self.spec(id)
  ---> 79         return spec.make()
       80 
       81     def all(self):
  
  /home/jheuristic/yozhik/gym/gym/envs/registration.pyc in make(self)
       52             raise error.Error('Attempting to make deprecated env {}. (HINT: is there a newer registered version of this env?)'.format(self.id))
       53 
  ---> 54         cls = load(self._entry_point)
       55         env = cls(**self._kwargs)
       56 
  
  /home/jheuristic/yozhik/gym/gym/envs/registration.pyc in load(name)
       11 def load(name):
       12     entry_point = pkg_resources.EntryPoint.parse('x={}'.format(name))
  ---> 13     result = entry_point.load(False)
       14     return result
       15 
  
  /home/jheuristic/thenv/local/lib/python2.7/site-packages/pkg_resources/__init__.pyc in load(self, require, *args, **kwargs)
     2378         if require:
     2379             self.require(*args, **kwargs)
  -> 2380         return self.resolve()
     2381 
     2382     def resolve(self):
  
  /home/jheuristic/thenv/local/lib/python2.7/site-packages/pkg_resources/__init__.pyc in resolve(self)
     2384         Resolve the entry point from its module and attrs.
     2385         """
  -> 2386         module = __import__(self.module_name, fromlist=['__name__'], level=0)
     2387         try:
     2388             return functools.reduce(getattr, self.attrs, module)
  
  /home/jheuristic/yozhik/gym/gym/envs/box2d/__init__.py in <module>()
  ----> 1 from gym.envs.box2d.lunar_lander import LunarLander
        2 from gym.envs.box2d.bipedal_walker import BipedalWalker, BipedalWalkerHardcore
  
  /home/jheuristic/yozhik/gym/gym/envs/box2d/lunar_lander.py in <module>()
        3 from six.moves import xrange
        4 
  ----> 5 import Box2D
        6 from Box2D.b2 import (edgeShape, circleShape, fixtureDef, polygonShape, revoluteJointDef, contactListener)
        7 
  
  /home/jheuristic/thenv/local/lib/python2.7/site-packages/Box2D/__init__.py in <module>()
       18 # 3. This notice may not be removed or altered from any source distribution.
       19 #
  ---> 20 from .Box2D import *
       21 __author__ = '$Date$'
       22 __version__ = '2.3.1'
  
  /home/jheuristic/thenv/local/lib/python2.7/site-packages/Box2D/Box2D.py in <module>()
      433     return _Box2D.b2CheckPolygon(shape, additional_checks)
      434 
  --> 435 _Box2D.RAND_LIMIT_swigconstant(_Box2D)
      436 RAND_LIMIT = _Box2D.RAND_LIMIT
      437 
  
  AttributeError: 'module' object has no attribute 'RAND_LIMIT_swigconstant'
  
  ```
  
  What didn't help:
  
  ```
  pip uninstall gym
  apt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl
  git clone https://github.com/openai/gym
  cd gym
  pip install -e .[all] --upgrade
  ```
  
  The OS is Ubuntu 14.04 Server x64
  It may be a clue that i am running the thing from inside python2 virtualenv (with all numpys, etc. installed)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 from setuptools import setup, find_packages
  2 import sys, os.path
  3 
  4 # Don't import gym module here, since deps may not be installed
  5 sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))
  6 from version import VERSION
  7 
  8 # Environment-specific dependencies.
  9 extras = {
  10   'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'],
  11   'board_game' : ['pachi-py>=0.0.19'],
  12   'box2d': ['box2d-py'],
  13   'classic_control': ['PyOpenGL'],
  14   'mujoco': ['mujoco_py>=0.4.3', 'imageio'],
  15   'parameter_tuning': ['keras', 'theano'],
  16 }
  17 
  18 # Meta dependency groups.
  19 all_deps = []
  20 for group_name in extras:
  21     all_deps += extras[group_name]
  22 extras['all'] = all_deps
  23 
  24 setup(name='gym',
  25       version=VERSION,
  26       description='The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.',
  27       url='https://github.com/openai/gym',
  28       author='OpenAI',
  29       author_email='gym@openai.com',
  30       license='',
  31       packages=[package for package in find_packages()
  32                 if package.startswith('gym')],
  33       zip_safe=False,
  34       install_requires=[
  35           'numpy>=1.10.4', 'requests>=2.0', 'six', 'pyglet>=1.2.0',
  36       ],
  37       extras_require=extras,
  38       package_data={'gym': ['envs/mujoco/assets/*.xml', 'envs/classic_control/assets/*.png']},
  39       tests_require=['pytest', 'mock'],
  40 )
  41
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -9,7 +9,7 @@
   extras = {
     'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'],
     'board_game' : ['pachi-py>=0.0.19'],
  -  'box2d': ['box2d-py'],
  +  'box2d': ['Box2D-kengz'],
     'classic_control': ['PyOpenGL'],
     'mujoco': ['mujoco_py>=0.4.3', 'imageio'],
     'parameter_tuning': ['keras', 'theano'],
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n extras = {\n   'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'],\n   'board_game' : ['pachi-py>=0.0.19'],\n-  'box2d': ['box2d-py'],\n+  'box2d': ['Box2D-kengz'],\n   'classic_control': ['PyOpenGL'],\n   'mujoco': ['mujoco_py>=0.4.3', 'imageio'],\n   'parameter_tuning': ['keras', 'theano'],\n", "issue": "Box2d won't find some RAND_LIMIT_swigconstant\nHello!\n\nIt's probably some silly mistake on my side, but i wasn't able to fix by random lever pulling, as usual.\n\nInstalling Box2d as in instuctions (using `pip install -e .[all]`) will throw error when trying to use some of Box2D examples.\n\nCode that reproduces the issue:\n\n```\nimport gym\natari = gym.make('LunarLander-v0')\natari.reset()\n```\n\n```\n[2016-05-16 02:14:25,430] Making new env: LunarLander-v0\n\n---------------------------------------------------------------------------\nAttributeError                            Traceback (most recent call last)\n<ipython-input-1-f89e78f4410b> in <module>()\n      1 import gym\n----> 2 atari = gym.make('LunarLander-v0')\n      3 atari.reset()\n      4 #plt.imshow(atari.render('rgb_array'))\n\n/home/jheuristic/yozhik/gym/gym/envs/registration.pyc in make(self, id)\n     77         logger.info('Making new env: %s', id)\n     78         spec = self.spec(id)\n---> 79         return spec.make()\n     80 \n     81     def all(self):\n\n/home/jheuristic/yozhik/gym/gym/envs/registration.pyc in make(self)\n     52             raise error.Error('Attempting to make deprecated env {}. (HINT: is there a newer registered version of this env?)'.format(self.id))\n     53 \n---> 54         cls = load(self._entry_point)\n     55         env = cls(**self._kwargs)\n     56 \n\n/home/jheuristic/yozhik/gym/gym/envs/registration.pyc in load(name)\n     11 def load(name):\n     12     entry_point = pkg_resources.EntryPoint.parse('x={}'.format(name))\n---> 13     result = entry_point.load(False)\n     14     return result\n     15 \n\n/home/jheuristic/thenv/local/lib/python2.7/site-packages/pkg_resources/__init__.pyc in load(self, require, *args, **kwargs)\n   2378         if require:\n   2379             self.require(*args, **kwargs)\n-> 2380         return self.resolve()\n   2381 \n   2382     def resolve(self):\n\n/home/jheuristic/thenv/local/lib/python2.7/site-packages/pkg_resources/__init__.pyc in resolve(self)\n   2384         Resolve the entry point from its module and attrs.\n   2385         \"\"\"\n-> 2386         module = __import__(self.module_name, fromlist=['__name__'], level=0)\n   2387         try:\n   2388             return functools.reduce(getattr, self.attrs, module)\n\n/home/jheuristic/yozhik/gym/gym/envs/box2d/__init__.py in <module>()\n----> 1 from gym.envs.box2d.lunar_lander import LunarLander\n      2 from gym.envs.box2d.bipedal_walker import BipedalWalker, BipedalWalkerHardcore\n\n/home/jheuristic/yozhik/gym/gym/envs/box2d/lunar_lander.py in <module>()\n      3 from six.moves import xrange\n      4 \n----> 5 import Box2D\n      6 from Box2D.b2 import (edgeShape, circleShape, fixtureDef, polygonShape, revoluteJointDef, contactListener)\n      7 \n\n/home/jheuristic/thenv/local/lib/python2.7/site-packages/Box2D/__init__.py in <module>()\n     18 # 3. This notice may not be removed or altered from any source distribution.\n     19 #\n---> 20 from .Box2D import *\n     21 __author__ = '$Date$'\n     22 __version__ = '2.3.1'\n\n/home/jheuristic/thenv/local/lib/python2.7/site-packages/Box2D/Box2D.py in <module>()\n    433     return _Box2D.b2CheckPolygon(shape, additional_checks)\n    434 \n--> 435 _Box2D.RAND_LIMIT_swigconstant(_Box2D)\n    436 RAND_LIMIT = _Box2D.RAND_LIMIT\n    437 \n\nAttributeError: 'module' object has no attribute 'RAND_LIMIT_swigconstant'\n\n```\n\nWhat didn't help:\n\n```\npip uninstall gym\napt-get install -y python-numpy python-dev cmake zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl\ngit clone https://github.com/openai/gym\ncd gym\npip install -e .[all] --upgrade\n```\n\nThe OS is Ubuntu 14.04 Server x64\nIt may be a clue that i am running the thing from inside python2 virtualenv (with all numpys, etc. installed)\n\n", "before_files": [{"content": "from setuptools import setup, find_packages\nimport sys, os.path\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))\nfrom version import VERSION\n\n# Environment-specific dependencies.\nextras = {\n  'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'],\n  'board_game' : ['pachi-py>=0.0.19'],\n  'box2d': ['box2d-py'],\n  'classic_control': ['PyOpenGL'],\n  'mujoco': ['mujoco_py>=0.4.3', 'imageio'],\n  'parameter_tuning': ['keras', 'theano'],\n}\n\n# Meta dependency groups.\nall_deps = []\nfor group_name in extras:\n    all_deps += extras[group_name]\nextras['all'] = all_deps\n\nsetup(name='gym',\n      version=VERSION,\n      description='The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.',\n      url='https://github.com/openai/gym',\n      author='OpenAI',\n      author_email='gym@openai.com',\n      license='',\n      packages=[package for package in find_packages()\n                if package.startswith('gym')],\n      zip_safe=False,\n      install_requires=[\n          'numpy>=1.10.4', 'requests>=2.0', 'six', 'pyglet>=1.2.0',\n      ],\n      extras_require=extras,\n      package_data={'gym': ['envs/mujoco/assets/*.xml', 'envs/classic_control/assets/*.png']},\n      tests_require=['pytest', 'mock'],\n)\n", "path": "setup.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\nimport sys, os.path\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))\nfrom version import VERSION\n\n# Environment-specific dependencies.\nextras = {\n  'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'],\n  'board_game' : ['pachi-py>=0.0.19'],\n  'box2d': ['Box2D-kengz'],\n  'classic_control': ['PyOpenGL'],\n  'mujoco': ['mujoco_py>=0.4.3', 'imageio'],\n  'parameter_tuning': ['keras', 'theano'],\n}\n\n# Meta dependency groups.\nall_deps = []\nfor group_name in extras:\n    all_deps += extras[group_name]\nextras['all'] = all_deps\n\nsetup(name='gym',\n      version=VERSION,\n      description='The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.',\n      url='https://github.com/openai/gym',\n      author='OpenAI',\n      author_email='gym@openai.com',\n      license='',\n      packages=[package for package in find_packages()\n                if package.startswith('gym')],\n      zip_safe=False,\n      install_requires=[\n          'numpy>=1.10.4', 'requests>=2.0', 'six', 'pyglet>=1.2.0',\n      ],\n      extras_require=extras,\n      package_data={'gym': ['envs/mujoco/assets/*.xml', 'envs/classic_control/assets/*.png']},\n      tests_require=['pytest', 'mock'],\n)\n", "path": "setup.py"}]}