Open HYDesmondLiu opened 3 years ago
Environment: Ubuntu 18.04 / Python 3.8.5 gym==0.18.3 gym-maze==0.4 gym-minigrid==1.0.2 gym3==0.3.3 -e git+https://github.com/rail-berkeley/d4rl.git@9b68f31bab6a8546edfb28ff0bd9d5916c62fd1f#egg=d4rl
I was trying to get dataset for MuJoCo Hopper env. The error messages are pasted below.
>>> env = gym.make('Hopper-v3') >>> dataset = env.get_dataset() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/hsinyu/anaconda3/lib/python3.8/site-packages/gym/core.py", line 223, in __getattr__ return getattr(self.env, name) AttributeError: 'HopperEnv' object has no attribute 'get_dataset' >>> dataset = d4rl.qlearning_dataset(env) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data3/hsinyu/00_BRL/BEAR/d4rl/d4rl/__init__.py", line 87, in qlearning_dataset dataset = env.get_dataset(**kwargs) File "/home/hsinyu/anaconda3/lib/python3.8/site-packages/gym/core.py", line 223, in __getattr__ return getattr(self.env, name) AttributeError: 'HopperEnv' object has no attribute 'get_dataset'
try to reinstall gym=0.18.0
Hi, I got the same issue for gym==0.18.0. Did you solve it?
I change import gymnasium as gym to import gym and it works.
import gymnasium as gym
import gym
Environment: Ubuntu 18.04 / Python 3.8.5 gym==0.18.3 gym-maze==0.4 gym-minigrid==1.0.2 gym3==0.3.3 -e git+https://github.com/rail-berkeley/d4rl.git@9b68f31bab6a8546edfb28ff0bd9d5916c62fd1f#egg=d4rl
I was trying to get dataset for MuJoCo Hopper env. The error messages are pasted below.