Skip to content

Commit

Permalink
Add hints in the documentation to install gym 0.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nhuet committed Apr 20, 2023
1 parent 77506ca commit b4ca2df
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ Here are the steps to follow:
```shell
poetry env use 3.8.11
```

- Preinstall gym 0.21.0 with appropriate option to avoid an error during installation
(see this [issue](https://github.com/openai/gym/issues/3176)
and this [solution](https://github.com/python-poetry/poetry/issues/3433#issuecomment-840509576)):
```shell
poetry run pip install gym==0.21.0 --no-use-pep517
```

- Install all dependencies as defined in `poetry.lock`, build and install the c++ library.
```shell
Expand Down Expand Up @@ -122,6 +129,13 @@ as it can also be installed by conda via the conda-forge channel.
poetry self add poetry-dynamic-versioning
```

- Preinstall gym 0.21.0 with appropriate option to avoid an error during installation
(see this [issue](https://github.com/openai/gym/issues/3176)
and this [solution](https://github.com/python-poetry/poetry/issues/3433#issuecomment-840509576)):
```shell
poetry run pip install gym==0.21.0 --no-use-pep517
```

- Install all dependencies as defined in `poetry.lock`, build and install the c++ library.
```shell
rm -rf build # removing previous build
Expand Down
17 changes: 17 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,20 @@ Alternatively you can choose to only install the core library, which is enough i
pip install -U pip
pip install -U scikit-decide
```

## Troubleshooting

You may encounter an [error when installing `gym==0.21.0`](https://github.com/openai/gym/issues/3176) which happens to be a dependency of `scikit-decide[all]`. This is because its installation does not
respect PEP 517 which is enforced by default by last versions of pip and setuptools. The solution is to install it beforehand:
```shell
pip install -U pip
pip install wheel # necessary to make work the following option
pip install gym==0.21.0 --no-use-pep517
pip install -U scikit-decide[all]
```

::: tip Note
Newer versions of gym or [gymnasium](https://gymnasium.farama.org/), typically greater than 0.26 are not yet possible
because of a conflict between [`ray[rllib]`](https://github.com/ray-project/ray/issues/34396)
and [`stable-baselines3`](https://github.com/DLR-RM/stable-baselines3/issues/1452).
:::

0 comments on commit b4ca2df

Please sign in to comment.