metadriverse / metadrive

MetaDrive: Open-source driving simulator
https://metadriverse.github.io/metadrive/
Apache License 2.0
785 stars 110 forks source link

Installing Metadrive. Error: subprocess-exited-with-error #761

Closed oonuro closed 1 month ago

oonuro commented 1 month ago

Hello, I am getting an issue when I am installing library "metadrive". Is this issue from my site? What should I do fix it?

(.venv) root@root:~/projectpy$ pip install metadrive-simulator
Collecting metadrive-simulator
  Using cached metadrive_simulator-0.2.6.0-py3-none-any.whl.metadata (8.6 kB)
Collecting gym==0.19.0 (from metadrive-simulator)
  Using cached gym-0.19.0.tar.gz (1.6 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      /tmp/pip-build-env-ipjfv3xj/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
        warnings.warn(msg)
      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: subprocess-exited-with-error

× Getting requirements to build 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.

Python libraries in the virtual environment;


Package     Version
----------- -------
cloudpickle 3.0.0
gym         0.26.2
gym-notices 0.0.8
numpy       2.1.1
pip         24.2
QuanyiLi commented 1 month ago

The metadrive version collected by your pip is 0.2.6, but the latest version is 0.4.2.3. This could be due to the Python version being too low. If so, upgrade your python to 3.9<python<=3.12.

Then please try pip install metadrive-simulator==0.4.2.3 or install from github (Recommended).

oonuro commented 1 month ago

Hello, thank you very much for your help. I managed to install it.