Open dydgus5120 opened 1 year ago
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.
What is the maximum version of setuptools allowed? As v0.21 is 2 years old, there are no plan to make a new release
From setuptools: https://github.com/pypa/setuptools/issues/3801
pip3 install setuptools==65.5.0
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?
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
I have this problem too, which version of GYM supports a higher version of setuptools
?
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 ofsetuptools
than65.5.0
Seems like this was an intentional change of setuptools
that will not be fixed: https://github.com/pypa/setuptools/issues/3772#issuecomment-1384342813
I'm not sure how to fix it on Gym side, though; didn't check all the details.
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.
Some authors have noted that you might need to downgrade wheel<0.40.0
(https://github.com/openai/gym/issues/3211)
it's become a real problem - as you'll ALSO need to downgrade pip to <23.1 (iirc) - as that has a packaging update that dumps support for the syntax error in the requirements file.
We've since been able to update to the alpha/beta version of sb3, which drops gym as dependency in favor of gymnasium, which basically fixed all install problems in this regard.
So, for all people having the issue, please take a look at https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues/184#issuecomment-1556859789
in short, if you need to use gym 0.21 (and SB3 v1.x), you need to downgrade both setuptools and pip
pip install setuptools==65.5.0 pip==21 # gym 0.21 installation is broken with more recent versions
otherwise, the solution is to upgrade to gymnasium and SB3 v2.x (in beta currently):
pip install "sb3_contrib>=2.0.0a9" # SB3 contrib also installs SB3
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.
From setuptools: pypa/setuptools#3801
pip3 install setuptools==65.5.0
for the ones who have still some problems, check here: https://github.com/openai/gym/issues/3211
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
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