Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rafael222mg opened this issue May 2, 2023 · 12 comments

Comments

@Rafael222mg
Copy link

Rafael222mg commented May 2, 2023

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
Copy link
Contributor

pseudo-rnd-thoughts commented May 2, 2023

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

@Kash5794
Copy link

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

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

@Kash5794
Copy link

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
Copy link

Pythoniasm commented May 15, 2023

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
Copy link
Contributor

pseudo-rnd-thoughts commented May 15, 2023

@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/

pseudo-rnd-thoughts added a commit to Farama-Foundation/Shimmy that referenced this issue May 15, 2023
For "gym-v21", the installation is "gym>=0.21" however this allows gym==0.26 to be installed, failing the exact case. 

Additionally, we could look to add the same requirements as specified in openai/gym#3211
@fanyuzeng
Copy link

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

@fanyuzeng
Copy link

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

@muximus3
Copy link

muximus3 commented Mar 1, 2024

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

@denoiser-ml
Copy link

Sorry, I think this problem is still open:

image

@Pythoniasm
Copy link

Pythoniasm commented Nov 3, 2024 via email

@denoiser-ml
Copy link

Thanks @Pythoniasm , please let me know if you can dive into it!

@xqzh268
Copy link

xqzh268 commented Nov 12, 2024

I tried to install gym 0.19.0 today and encountered this problem. At first I downgrade setuptools to 57.5.0, still failed to install. Then I downgrade wheels from 0.44.0 to 0.37.0 and finally managed to install.

Here's my environment list, hopefully it will help someone with similar questions:

  • Python 3.9 (3.8 also works)
  • pip 23.2.1 (24.0 also works)
  • gym 0.19.0
  • setuptools 57.5.0
  • wheel 0.37.0

Notably, gym 0.22.0 can be smoothly installed without any trouble. Hope this can help those who needs to install old version of gym.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants