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]: pip install setuptools 67.1.0 issue #1324

Closed
4 tasks done
JRowbottomGit opened this issue Feb 9, 2023 · 8 comments · Fixed by #1327
Closed
4 tasks done

[Bug]: pip install setuptools 67.1.0 issue #1324

JRowbottomGit opened this issue Feb 9, 2023 · 8 comments · Fixed by #1327
Labels
bug Something isn't working duplicate This issue or pull request already exists openai gym related to OpenAI Gym interface

Comments

@JRowbottomGit
Copy link

🐛 Bug

Conda environment with Python version 3.10.9
running: pip install stable-baselines3
gives error:

Collecting stable-baselines3
  Using cached stable_baselines3-1.7.0-py3-none-any.whl (171 kB)
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.

The fix is to downgrade setuptools:

pip install -U setuptools==65.5.0

Collecting setuptools==65.5.0
  Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 67.1.0
    Uninstalling setuptools-67.1.0:
      Successfully uninstalled setuptools-67.1.0
Successfully installed setuptools-65.5.0

To Reproduce

from stable_baselines3 import ...

Relevant log output / Error message

Collecting stable-baselines3
  Using cached stable_baselines3-1.7.0-py3-none-any.whl (171 kB)
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.

System Info

No response

Checklist

  • I have checked that there is no similar issue in the repo
  • I have read the documentation
  • I have provided a minimal working example to reproduce the bug
  • I've used the markdown code blocks for both code and stack traces.
@JRowbottomGit JRowbottomGit added the bug Something isn't working label Feb 9, 2023
@araffin
Copy link
Member

araffin commented Feb 9, 2023

Duplicate of openai/gym#3176 (comment)

pip3 install setuptools==65.5.0 should solve the issue

if you need a newer version of setuptools, you can use #780

@araffin araffin added the duplicate This issue or pull request already exists label Feb 9, 2023
@araffin
Copy link
Member

araffin commented Feb 9, 2023

@qgallouedec shall we enforce the version until #780 is ready?

@araffin araffin added the openai gym related to OpenAI Gym interface label Feb 9, 2023
@qgallouedec
Copy link
Collaborator

@qgallouedec shall we enforce the version until #780 is ready?

Yes.

@JRowbottomGit
Copy link
Author

apologies for dupe issue

@araffin araffin mentioned this issue Feb 20, 2023
4 tasks
@araffin
Copy link
Member

araffin commented Mar 2, 2023

@qgallouedec shall we enforce the version until #780 is ready?

Actually, setuptools is used for build, so I'm not sure that adding it in the requirement will solve the issue.
Anyway, this will be solved by #1327 .

@ReHoss
Copy link
Contributor

ReHoss commented Apr 4, 2023

After running :

pip3 install setuptools==65.5.0

and

pip install stable-baselines3[extra]

I get those following errors and warnings (last part of the log output):

WARNING: The candidate selected for download or install is a yanked version: 'atari-py' candidate (version 0.2.6 at https://files.pythonhosted.org/packages/43/dd/2721f34a89dc520d2e09363fd23d110a33bbab2399e50fdced6eb2ed2157/atari-py-0.2.6.tar.gz (from https://pypi.org/simple/atari-py/))
Reason for being yanked: re-release with new wheels
Building wheels for collected packages: atari-py, gym, lit
  Building wheel for atari-py (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [516 lines of output]
  ERROR: Failed building wheel for gym
  Running setup.py clean for gym
  Building wheel for lit (setup.py) ... done
  Created wheel for lit: filename=lit-16.0.0-py3-none-any.whl size=93586 sha256=091a629141ac70f758dbdfaf8446fc43dde8273edf422408c885f13fdf640714
  Stored in directory: /gpfs7kw/linkhome/rech/genrqo01/ucd32aq/.cache/pip/wheels/7d/8a/27/f0fa30de83ae4077766dd607b818b68d8b2fac3a6ca649464a
Successfully built lit
Failed to build atari-py gym
Installing collected packages: tensorboard-plugin-wit, pytz, pyasn1, mpmath, lit, cmake, urllib3, tzdata, typing-extensions, tensorboard-data-server, sympy, six, rsa, pyparsing, pyasn1-modules, psutil, protobuf, pillow, packaging, oauthlib, nvidia-nvtx-cu11, nvidia-nccl-cu11, nvidia-cusparse-cu11, nvidia-curand-cu11, nvidia-cufft-cu11, nvidia-cuda-runtime-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-cupti-cu11, nvidia-cublas-cu11, numpy, networkx, MarkupSafe, markdown, kiwisolver, idna, grpcio, fonttools, filelock, cycler, cloudpickle, charset-normalizer, certifi, cachetools, absl-py, werkzeug, requests, python-dateutil, opencv-python, nvidia-cusolver-cu11, nvidia-cudnn-cu11, jinja2, gym, google-auth, contourpy, atari-py, requests-oauthlib, pandas, matplotlib, google-auth-oauthlib, tensorboard, triton, torch, stable-baselines3
  Running setup.py install for gym ... done
  DEPRECATION: gym was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 23.1 will enforce this behaviour change. A possible replacement is to fix the wheel build issue reported above. Discussion can be found at https://github.com/pypa/pip/issues/8368
  Running setup.py install for atari-py ... |^/^_^done
  DEPRECATION: atari-py was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 23.1 will enforce this behaviour change. A possible replacement is to fix the wheel build issue reported above. Discussion can be found at https://github.com/pypa/pip/issues/8368

_Preparing metadata (setup.py) _ now worked thanks to downgrading setuptools. But I get the following error:

 Building wheel for atari-py (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1

I also have in the sequel of this message, this cmake error:

  Traceback (most recent call last):
    File "/tmp/pip-install-ha0wey7k/atari-py_c99e6d0e2b414da6b060a8e040d33a94/setup.py", line 22, in run
      subprocess.check_call(['cmake', '..'], cwd=cwd)
    File "/linkhome/rech/genrqo01/ucd32aq/.conda/envs/sb3-contrib/lib/python3.11/subprocess.py", line 408, in check_call
      retcode = call(*popenargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/linkhome/rech/genrqo01/ucd32aq/.conda/envs/sb3-contrib/lib/python3.11/subprocess.py", line 389, in call
      with Popen(*popenargs, **kwargs) as p:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/linkhome/rech/genrqo01/ucd32aq/.conda/envs/sb3-contrib/lib/python3.11/subprocess.py", line 1024, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/linkhome/rech/genrqo01/ucd32aq/.conda/envs/sb3-contrib/lib/python3.11/subprocess.py", line 1901, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  PermissionError: [Errno 13] Permission denied: 'cmake'
  
  During handling of the above exception, another exception occurred:

cmake permission denied. Note that I am not sudo on the computer. So is this comes from the [extra] option or from the atari-py which is not compatible with gym v21 anymore ?

Thank you:)

@araffin
Copy link
Member

araffin commented Apr 4, 2023

@ReHoss doesn't look like a SB3 issue, you can use #1327 which should solve your issues

@ReHoss
Copy link
Contributor

ReHoss commented Apr 4, 2023

@ReHoss doesn't look like a SB3 issue, you can use #1327 which should solve your issues

Thanks! Should be related to the HPC then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists openai gym related to OpenAI Gym interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants