huggingface/deep-rl-class

[HANDS-ON BUG] Bonus Unit 1

dmwit opened this issue · 4 comments

dmwit commented

Describe the bug

The cell which is supposed to install ml-agents in the Huggy bonus unit errors out. To discover this, I had to remove the %%capture and modify the cd so that it was idempotent. The updated cell contents look like this:

%cd /content/ml-agents
!pip3 install -e ./ml-agents-envs
!pip3 install -e ./ml-agents

Here is the error I see as a result:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Obtaining file:///content/ml-agents/ml-agents-envs
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cloudpickle in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (2.2.1)
Requirement already satisfied: grpcio>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (1.54.0)
Requirement already satisfied: Pillow>=4.2.1 in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (8.4.0)
Collecting protobuf<3.20,>=3.6 (from mlagents-envs==0.31.0.dev0)
  Using cached protobuf-3.19.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Requirement already satisfied: pyyaml>=3.1.0 in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (6.0)
Requirement already satisfied: gym>=0.21.0 in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (0.25.2)
Collecting pettingzoo==1.15.0 (from mlagents-envs==0.31.0.dev0)
  Using cached PettingZoo-1.15.0.tar.gz (756 kB)
  Preparing metadata (setup.py) ... done
Collecting numpy==1.21.2 (from mlagents-envs==0.31.0.dev0)
  Using cached numpy-1.21.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)
Requirement already satisfied: filelock>=3.4.0 in /usr/local/lib/python3.10/dist-packages (from mlagents-envs==0.31.0.dev0) (3.12.0)
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.10.12 not in '<=3.10.11,>=3.8.13'
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Obtaining file:///content/ml-agents/ml-agents
  Preparing metadata (setup.py) ... done
Requirement already satisfied: grpcio>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from mlagents==0.31.0.dev0) (1.54.0)
Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.10/dist-packages (from mlagents==0.31.0.dev0) (3.8.0)
INFO: pip is looking at multiple versions of mlagents to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 0.10.0.dev0 Requires-Python >=3.5,<3.8; 0.29.0 Requires-Python >=3.7.2,<3.10.0; 0.30.0 Requires-Python >=3.8.13,<=3.10.8; 0.6.0 Requires-Python >=3.5,<=3.7; 0.6.1 Requires-Python >=3.5,<=3.7; 0.6.2 Requires-Python >=3.5,<=3.7; 0.8.0 Requires-Python >=3.5,<3.8; 0.8.1 Requires-Python >=3.5,<3.8; 0.8.2 Requires-Python >=3.5,<3.8; 0.9.0 Requires-Python >=3.5,<3.8; 0.9.1 Requires-Python >=3.5,<3.8; 0.9.2 Requires-Python >=3.5,<3.8; 0.9.3 Requires-Python >=3.5,<3.8
ERROR: Could not find a version that satisfies the requirement mlagents_envs==0.31.0.dev0 (from mlagents) (from versions: 0.10.0.dev1, 0.10.0, 0.10.1, 0.11.0.dev0, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.26.0, 0.27.0, 0.28.0)
ERROR: No matching distribution found for mlagents_envs==0.31.0.dev0

Material

  • Did you use Google Colab?

yes

If not:

  • Your Operating system (OS)
  • Version of your OS
dmwit commented

FWIW, after a bit of fiddling, I found that changing ml-agents/setup.py and ml-agents-envs/setup.py allowed the installation step to go through, bumping the python_requires line to allow 3.10.12. So one possible fix would be committing a change like that to the ml-agents repo.

Thanks for pointing this out, the release note of google colab does not mention 3.10.12 but I just tried and indeed it's 3.10.12 so I'm opening a PR in MLAgents to update setup.py.

The Unity MLAgents was updated I'm closing the issue