Skip to content

[BUG] cannot use GymEnv() says '_set_gym_args' has not been found #1583

@EkaterinaAbramova

Description

@EkaterinaAbramova

Describe the bug

The following is not working:

base_env = GymEnv("InvertedDoublePendulum-v4", device=device, frame_skip=frame_skip)
ModuleNotFoundError: Supported version of '_set_gym_args' has not been found.

To Reproduce

conda create --name gpu-torch-rl python=3.10 spyder=5.4.3
conda activate gpu-torch-rl

git clone https://github.com/pytorch/rl /Users/bondgirl007/anaconda3/repos/rl

cd /Users/bondgirl007/anaconda3/repos/rl/
pip install -e .

pip uninstall tensordict
pip install git+https://github.com/pytorch-labs/tensordict

Then I am trying to run this tutorial from PyTorch: https://pytorch.org/tutorials/intermediate/reinforcement_ppo.html
Everything up until this line is ok, but then the line doesn't run:
base_env = GymEnv("InvertedDoublePendulum-v4", device=device, frame_skip=frame_skip)

Expected behavior

to obtain base_env after calling GymEnv()

Screenshots

Screenshot 2023-09-29 at 12 33 14

System info

MacBook Pro M2 max
Version: 13.5.2

import torchrl, numpy, sys
print(torchrl.__version__, numpy.__version__, sys.version, sys.platform)
0.1.1+18b33fe 1.26.0 3.10.13 (main, Sep 11 2023, 08:16:02) [Clang 14.0.6 ] darwin

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions