You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried creating my own gym, which is giving me an error. However, to ensure its my problem, I tried importing a regular gym, and the error remains. This is a simple import, nothing else.
Call Stack: Traceback (most recent call last): File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\Lib\site-packages\gym\envs\test.py", line 1, in <module> import gym File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\__init__.py", line 10, in <module> from gym.core import Env, GoalEnv, Space, Wrapper, ObservationWrapper, ActionWrapper, RewardWrapper File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\core.py", line 2, in <module> import numpy as np File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py", line 142, in <module> from . import add_newdocs File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\__init__.py", line 8, in <module> from .type_check import * File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\type_check.py", line 11, in <module> import numpy.core.numeric as _nx File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\__init__.py", line 74, in <module> from numpy.testing import _numpy_tester File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\testing\__init__.py", line 10, in <module> from unittest import TestCase File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\Lib\site-packages\gym\envs\unittest\__init__.py", line 1, in <module> from gym.envs.unittest.cube_crash import CubeCrash File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\unittest\__init__.py", line 1, in <module> from gym.envs.unittest.cube_crash import CubeCrash File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\unittest\cube_crash.py", line 3, in <module> from gym import spaces File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\spaces\__init__.py", line 1, in <module> from gym.spaces.box import Box File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\spaces\box.py", line 5, in <module> class Box(gym.Space): AttributeError: module 'gym' has no attribute 'Space'
The text was updated successfully, but these errors were encountered:
looks like some interference from previous package with similar name to me... could you post here the output of python -c "import gym; print('version: {}, path: {}'.format(gym.__version__, gym.__file__))" ?
Actually I managed to fix it.
Anaconda was, for some reason, placing everything related to Gym on a Python 2.7 environment, and the rest on a 3.x environment.
I have tried creating my own gym, which is giving me an error. However, to ensure its my problem, I tried importing a regular gym, and the error remains. This is a simple import, nothing else.
Call Stack:
Traceback (most recent call last): File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\Lib\site-packages\gym\envs\test.py", line 1, in <module> import gym File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\__init__.py", line 10, in <module> from gym.core import Env, GoalEnv, Space, Wrapper, ObservationWrapper, ActionWrapper, RewardWrapper File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\core.py", line 2, in <module> import numpy as np File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\__init__.py", line 142, in <module> from . import add_newdocs File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\__init__.py", line 8, in <module> from .type_check import * File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\lib\type_check.py", line 11, in <module> import numpy.core.numeric as _nx File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\__init__.py", line 74, in <module> from numpy.testing import _numpy_tester File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\testing\__init__.py", line 10, in <module> from unittest import TestCase File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\Lib\site-packages\gym\envs\unittest\__init__.py", line 1, in <module> from gym.envs.unittest.cube_crash import CubeCrash File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\unittest\__init__.py", line 1, in <module> from gym.envs.unittest.cube_crash import CubeCrash File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\unittest\cube_crash.py", line 3, in <module> from gym import spaces File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\spaces\__init__.py", line 1, in <module> from gym.spaces.box import Box File "D:\Users\F180024\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\spaces\box.py", line 5, in <module> class Box(gym.Space): AttributeError: module 'gym' has no attribute 'Space'
The text was updated successfully, but these errors were encountered: