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] Version 0.21 could not be installed. #3176

Open
1 task done
dydgus5120 opened this issue Jan 30, 2023 · 13 comments
Open
1 task done

[Bug Report] Version 0.21 could not be installed. #3176

dydgus5120 opened this issue Jan 30, 2023 · 13 comments

Comments

@dydgus5120
Copy link

Describe the bug

I got the following error while trying to install stable baselines 3
Checking the setup.py of stable baselines 3, it was supposed to install gym version 0.21, so when I tried to install gym version 0.21 separately, the same error came out.

how do i solve it?

Code example

Collecting gym==0.21
  Using cached gym-0.21.0.tar.gz (1.5 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

System Info
I installed with pip install gym==0.21 from docker on ubuntu 22.04 distro with wsl2 on windows 11.
docker base image is also ubuntu 22.04

Python version is 3.10.6.

Checklist

  • I have checked that there is no similar issue in the repo (required)
@dydgus5120
Copy link
Author

It appears to be incompatible with your version of setuptools.
It was not installed in the 67 version, but it was installed in the 66 version.

@pseudo-rnd-thoughts
Copy link
Contributor

What is the maximum version of setuptools allowed? As v0.21 is 2 years old, there are no plan to make a new release

@duenez
Copy link

duenez commented Jan 30, 2023

From setuptools: pypa/setuptools#3801

pip3 install setuptools==65.5.0

@stefanbschneider
Copy link

stefanbschneider commented Feb 8, 2023

I have the same issue and it's odd because we have been using gym 0.21 for a long time without problems. Did something change with the release or is it because there's a new setuptools version that is responsible?

Btw, I also can't access the release notes for 0.21: https://github.com/openai/gym/releases/tag/0.21.0
Is that on purpose?

@pseudo-rnd-thoughts
Copy link
Contributor

It looks like setuptools made a change that causes an error to be raised that previously did not therefore, setuptools either need to revert the change or users must use a prior version of setuptools than 65.5.0

You forgot a v in the version - https://github.com/openai/gym/releases/tag/v0.21.0

@dafmdev
Copy link

dafmdev commented Feb 16, 2023

I have this problem too, which version of GYM supports a higher version of setuptools?

@stefanbschneider
Copy link

It looks like setuptools made a change that causes an error to be raised that previously did not therefore, setuptools either need to revert the change or users must use a prior version of setuptools than 65.5.0

Seems like this was an intentional change of setuptools that will not be fixed: pypa/setuptools#3772 (comment)
I'm not sure how to fix it on Gym side, though; didn't check all the details.

@viraaj-jayaram
Copy link

I had the same issue and then even with downgrading setuptools I could not fix the problem because it kept getting killed. However, downgrading the setup tools and then bypassing the cache with pip install stable-baselines3[extra] --no-cache-dir finally worked for me.

Holmeswww added a commit to Holmeswww/SmartPlay that referenced this issue Oct 6, 2023
@deep-over
Copy link

deep-over commented May 2, 2024

I have successfully resolved the installation issue with gym-0.21.0 by manually downloading and modifying the source code.

Download the gym-0.21.0.tar.gz file from PyPI.
tar -xvf gym-0.21.0.tar.gz.
Modify the setup.py file. The error was located in the line containing opencv-python>=3..
After making the necessary correction, I completed the installation process.

@Yildirimm
Copy link

Yildirimm commented Jun 9, 2024

From setuptools: pypa/setuptools#3801

pip3 install setuptools==65.5.0

for the ones who have still some problems, check here: #3211

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

10 participants