here is my code:
!pip install box2d-py==2.3.8
import gym
env = gym.make('CarRacing-v0')
The err-msg is:
AttributeError: module 'gym.envs.box2d' has no attribute 'CarRacing'
But the same code is ok when colab is using the CPU environment.
here is my code:
!pip install box2d-py==2.3.8
import gym
env = gym.make('CarRacing-v0')
The err-msg is:
AttributeError: module 'gym.envs.box2d' has no attribute 'CarRacing'
But the same code is ok when colab is using the CPU environment.
Try doing
pip uninstall torch
and installing cuda version again
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
by the way try to use CarRacing-v2
instead of CarRacing-v0
environment_name = "CarRacing-v2"