openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.68k stars 8.61k forks source link

[Bug Report] again Gym==0.21 not installing anymore even with setuptools=65 #3211

Open Rafael222mg opened 1 year ago

Rafael222mg commented 1 year ago

Describe the bug Fail to install gym==0.21 (necessary for installing stable-baselines3 ) error: Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting gym==0.21 Using cached gym-0.21.0.tar.gz (1.5 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.18.0 in /usr/local/lib/python3.10/dist-packages (from gym==0.21) (1.24.3) Requirement already satisfied: cloudpickle>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from gym==0.21) (2.2.1) Building wheels for collected packages: gym error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Building wheel for gym (setup.py) ... error ERROR: Failed building wheel for gym Running setup.py clean for gym Failed to build gym ERROR: Could not build wheels for gym, which is required to install pyproject.toml-based projects

pseudo-rnd-thoughts commented 1 year ago

Do any of the solutions discussed in https://github.com/openai/gym/issues/3202 solve the issue?

Kash5794 commented 1 year ago

Do none of the solutions discussed in #3202 solve the issue?

No, absolutely none of them. I am stuck at the moment

Kash5794 commented 1 year ago

Describe the bug Fail to install gym==0.21 (necessary for installing stable-baselines3 ) error: Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Collecting gym==0.21 Using cached gym-0.21.0.tar.gz (1.5 MB) Preparing metadata (setup.py) ... done Requirement already satisfied: numpy>=1.18.0 in /usr/local/lib/python3.10/dist-packages (from gym==0.21) (1.24.3) Requirement already satisfied: cloudpickle>=1.2.0 in /usr/local/lib/python3.10/dist-packages (from gym==0.21) (2.2.1) Building wheels for collected packages: gym error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Building wheel for gym (setup.py) ... error ERROR: Failed building wheel for gym Running setup.py clean for gym Failed to build gym ERROR: Could not build wheels for gym, which is required to install pyproject.toml-based projects

Have you resolved this issue?

Pythoniasm commented 1 year ago

Can confirm this issue now comes on-top to the setuptools originated problem with packaing, see #3202, and seems like wheel also requires correct versioning strings, now. Accordingly, in contrast to the issue author, downgrading to "wheel<0.40.0" solves it - as a workaround. However, with further dependencies upgrading to packaging, the issue will recursively be re-introduced with a chain of "outdated" packages.

@pseudo-rnd-thoughts since I know how deeply you are involved into propelling RL into the broad community, I would like to give the feedback that this issue at hand is currently a show-stopper for amateur Pythoniasts. I still suggest to manually creating a post-release that fixes the issue and pushes to PyPI an updated v0.21.0. That will probably reduce the effort on both sides.

pseudo-rnd-thoughts commented 1 year ago

@Pythoniasm Thanks for the update that makes sense. Sadly this is an OpenAI issue, they control PyPI, and we the volunteers have no access to make new uploads. I will see if there is anything we can do

Edit: The person at OpenAI who was replying to our emails is no longer doing so. Furthermore, this is the cost of old, unmaintained software. We would recommend updating to gym >=0.21, we provide a migration guide - https://gymnasium.farama.org/content/migration-guide/

fanyuzeng commented 8 months ago

updating to gym ==0.22.0, the issue is addressed.

fanyuzeng commented 8 months ago

Contributor Great! Following your suggestion. I updating to gym ==0.22.0, the issue is addressed.

muximus3 commented 7 months ago

Downgrade both wheel and setuptools with pip install wheel==0.38.4 setuptools==66.0.0