huggingface/deep-rl-class

[HANDS-ON BUG] Chapt 7

Closed this issue · 1 comments

Environment: Using windows 11 and anaconda3

Instruction is
With conda, we create a new environment called rl with Python 3.9:
$ conda create --name rl python=3.9
$ conda activate rl

$ git clone https://github.com/Unity-Technologies/ml-agents

$ cd ml-agents
$ pip install -e ./ml-agents-envs

This last command produces and error: ERROR: Package 'mlagents-envs' requires a different Python: 3.9.18 not in '<=3.10.12,>=3.10.1'

I had to change the environment to a compatible Python version between 3.10.1 and 3.10.12 to get it to work

The full message is here (note I changed the env name to rl1 to avoid changing my existing working environment called rl:
(rl1) C:\Users\jfelg\anaconda3\envs\rl1\ml-agents>pip install -e ./ml-agents-envs
Obtaining file:///C:/Users/jfelg/anaconda3/envs/rl1/ml-agents/ml-agents-envs
Preparing metadata (setup.py) ... done
Collecting cloudpickle (from mlagents-envs==1.1.0.dev0)
Obtaining dependency information for cloudpickle from https://files.pythonhosted.org/packages/96/43/dae06432d0c4b1dc9e9149ad37b4ca8384cf6eb7700cd9215b177b914f0a/cloudpickle-3.0.0-py3-none-any.whl.metadata
Downloading cloudpickle-3.0.0-py3-none-any.whl.metadata (7.0 kB)
Collecting grpcio<=1.48.2,>=1.11.0 (from mlagents-envs==1.1.0.dev0)
Using cached grpcio-1.48.2-cp39-cp39-win_amd64.whl (3.6 MB)
Collecting Pillow>=4.2.1 (from mlagents-envs==1.1.0.dev0)
Obtaining dependency information for Pillow>=4.2.1 from https://files.pythonhosted.org/packages/98/56/0eb5a210de84b8c73720e6b691fe8fe1a99d62c8e8f0564b95f2c12988e8/Pillow-10.1.0-cp39-cp39-win_amd64.whl.metadata
Downloading Pillow-10.1.0-cp39-cp39-win_amd64.whl.metadata (9.6 kB)
Collecting protobuf<3.20,>=3.6 (from mlagents-envs==1.1.0.dev0)
Using cached protobuf-3.19.6-cp39-cp39-win_amd64.whl (895 kB)
Requirement already satisfied: pyyaml>=3.1.0 in c:\users\jfelg\anaconda3\envs\rl1\lib\site-packages (from mlagents-envs==1.1.0.dev0) (6.0)
Collecting gym>=0.21.0 (from mlagents-envs==1.1.0.dev0)
Using cached gym-0.26.2.tar.gz (721 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pettingzoo==1.15.0 (from mlagents-envs==1.1.0.dev0)
Using cached PettingZoo-1.15.0.tar.gz (756 kB)
Preparing metadata (setup.py) ... done
Collecting numpy<1.24.0,>=1.21.2 (from mlagents-envs==1.1.0.dev0)
Using cached numpy-1.23.5-cp39-cp39-win_amd64.whl (14.7 MB)
Collecting filelock>=3.4.0 (from mlagents-envs==1.1.0.dev0)
Obtaining dependency information for filelock>=3.4.0 from https://files.pythonhosted.org/packages/5e/5d/97afbafd9d584ff1b45fcb354a479a3609bd97f912f8f1f6c563cb1fae21/filelock-3.12.4-py3-none-any.whl.metadata
Using cached filelock-3.12.4-py3-none-any.whl.metadata (2.8 kB)
INFO: pip is looking at multiple versions of mlagents-envs to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'mlagents-envs' requires a different Python: 3.9.18 not in '<=3.10.12,>=3.10.1'

Hey, thanks for pointing this out 🤗. I merged PR #414 that solves this issue.