Farama-Foundation / stable-retro

Retro games for Reinforcement Learning
https://stable-retro.farama.org/
MIT License
162 stars 34 forks source link

Build on windows #64

Closed Tom-Neverwinter closed 1 year ago

Tom-Neverwinter commented 1 year ago

Issue summary

Cant build on windows using python

System information

Windows 10 3.10 gymnasium>=0.27.1->stable-retro==0.9.1) (1.25.2)

Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.5.5

cmake is installed

.net is installed. all depends of oobabooga webui a re virtual env as well as automatic 1111 even this env is in a v env.

pip install virtualenv mkdir GYM cd GYM virtualenv env env\Scripts\activate

pip install cmake wheel pip install "gymnasium[all]"

mismatch dependencies or specific dependencies not stated? causing issues and inability to install?

Collecting shimmy[atari]<1.0,>=0.1.0 (from gymnasium[all])
  Using cached Shimmy-0.2.1-py3-none-any.whl (25 kB)
Collecting box2d-py==2.3.5 (from gymnasium[all])
  Using cached box2d-py-2.3.5.tar.gz (374 kB)
  Preparing metadata (setup.py) ... done
Collecting pygame>=2.1.3 (from gymnasium[all])
  Obtaining dependency information for pygame>=2.1.3 from https://files.pythonhosted.org/packages/a7/56/3b86cf4fdf4fc37b8d5681de41dcc17d2ab44c1dfaf490d5ee1ca5165724/pygame-2.5.1-cp310-cp310-win_amd64.whl.metadata
  Using cached pygame-2.5.1-cp310-cp310-win_amd64.whl.metadata (13 kB)
Collecting swig==4.* (from gymnasium[all])
  Using cached swig-4.1.1-py2.py3-none-win_amd64.whl (2.5 MB)
Collecting mujoco-py<2.2,>=2.1 (from gymnasium[all])
  Using cached mujoco_py-2.1.2.14-py3-none-any.whl (2.4 MB)
Collecting cython<3 (from gymnasium[all])
  Obtaining dependency information for cython<3 from https://files.pythonhosted.org/packages/3f/d6/9eed523aeaca42acbaa3e6d3850edae780dc7f8da9df1bf6a2ceb851839c/Cython-0.29.36-py2.py3-none-any.whl.metadata
  Using cached Cython-0.29.36-py2.py3-none-any.whl.metadata (3.1 kB)
Collecting mujoco>=2.3.3 (from gymnasium[all])
  Obtaining dependency information for mujoco>=2.3.3 from https://files.pythonhosted.org/packages/ae/16/d0c59cfa27b1740420c90faa13a391ebfe4f2fa95f4e11f977b1efad7e98/mujoco-2.3.7-cp310-cp310-win_amd64.whl.metadata
  Using cached mujoco-2.3.7-cp310-cp310-win_amd64.whl.metadata (35 kB)
Collecting imageio>=2.14.1 (from gymnasium[all])
  Obtaining dependency information for imageio>=2.14.1 from https://files.pythonhosted.org/packages/7b/88/59411e1a652ac3338d348901ffa5a73daf1f67fcb3f97d750237d4fa0821/imageio-2.31.2-py3-none-any.whl.metadata
  Using cached imageio-2.31.2-py3-none-any.whl.metadata (4.7 kB)
Collecting jax>=0.4.0 (from gymnasium[all])
  Using cached jax-0.4.14-py3-none-any.whl
Collecting jaxlib>=0.4.0 (from gymnasium[all])
  Obtaining dependency information for jaxlib>=0.4.0 from https://files.pythonhosted.org/packages/5b/8e/e6349ed17bafd4e3967ac30a365597b38e3d38143659b34b1ef79a1ec0bc/jaxlib-0.4.14-cp310-cp310-win_amd64.whl.metadata
  Using cached jaxlib-0.4.14-cp310-cp310-win_amd64.whl.metadata (2.1 kB)
Collecting lz4>=3.1.0 (from gymnasium[all])
  Using cached lz4-4.3.2-cp310-cp310-win_amd64.whl (99 kB)
Collecting opencv-python>=3.0 (from gymnasium[all])
  Obtaining dependency information for opencv-python>=3.0 from https://files.pythonhosted.org/packages/fb/c4/f574ba6f04e6d7bf8c38d23e7a52389566dd7631fee0bcdd79ea07ef2dbf/opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl.metadata
  Using cached opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl.metadata (20 kB)
Collecting matplotlib>=3.0 (from gymnasium[all])
  Obtaining dependency information for matplotlib>=3.0 from https://files.pythonhosted.org/packages/ff/1f/2b83c7acf453318a80dc619e99fc30a663b2c1fb18be3d358a96addfecd9/matplotlib-3.7.2-cp310-cp310-win_amd64.whl.metadata
  Using cached matplotlib-3.7.2-cp310-cp310-win_amd64.whl.metadata (5.8 kB)
Collecting moviepy>=1.0.0 (from gymnasium[all])
  Using cached moviepy-1.0.3-py3-none-any.whl
Collecting torch>=1.0.0 (from gymnasium[all])
  Using cached torch-2.0.1-cp310-cp310-win_amd64.whl (172.3 MB)
Collecting pillow>=8.3.2 (from imageio>=2.14.1->gymnasium[all])
  Obtaining dependency information for pillow>=8.3.2 from https://files.pythonhosted.org/packages/d0/4f/faebe1180e5e6ad6330c539dda7f6081182157393ba6816a438f759a0e59/Pillow-10.0.0-cp310-cp310-win_amd64.whl.metadata
  Using cached Pillow-10.0.0-cp310-cp310-win_amd64.whl.metadata (9.6 kB)
Collecting ml-dtypes>=0.2.0 (from jax>=0.4.0->gymnasium[all])
  Obtaining dependency information for ml-dtypes>=0.2.0 from https://files.pythonhosted.org/packages/55/51/c430b4f5f4a6df00aa41c1ee195e179489565e61cfad559506ca7442ce67/ml_dtypes-0.2.0-cp310-cp310-win_amd64.whl.metadata
  Using cached ml_dtypes-0.2.0-cp310-cp310-win_amd64.whl.metadata (20 kB)
Collecting opt-einsum (from jax>=0.4.0->gymnasium[all])
  Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting scipy>=1.7 (from jax>=0.4.0->gymnasium[all])
  Obtaining dependency information for scipy>=1.7 from https://files.pythonhosted.org/packages/70/03/485f73046134400ea25d3cb178c5e6728f9b165f79d09638ecb44ee0e9b1/scipy-1.11.2-cp310-cp310-win_amd64.whl.metadata
  Using cached scipy-1.11.2-cp310-cp310-win_amd64.whl.metadata (59 kB)
Collecting contourpy>=1.0.1 (from matplotlib>=3.0->gymnasium[all])
  Obtaining dependency information for contourpy>=1.0.1 from https://files.pythonhosted.org/packages/94/0a/5eb57dd395fade977786b2d2c98c2bee8234358794be44422fe58a719d42/contourpy-1.1.0-cp310-cp310-win_amd64.whl.metadata
  Using cached contourpy-1.1.0-cp310-cp310-win_amd64.whl.metadata (5.7 kB)
Collecting cycler>=0.10 (from matplotlib>=3.0->gymnasium[all])
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0 (from matplotlib>=3.0->gymnasium[all])
  Obtaining dependency information for fonttools>=4.22.0 from https://files.pythonhosted.org/packages/1c/c6/408ee90eae2fd7ef85c5baaedfc8d533805f4c54fc6670dbde9539f1277b/fonttools-4.42.1-cp310-cp310-win_amd64.whl.metadata
  Using cached fonttools-4.42.1-cp310-cp310-win_amd64.whl.metadata (154 kB)
Collecting kiwisolver>=1.0.1 (from matplotlib>=3.0->gymnasium[all])
  Obtaining dependency information for kiwisolver>=1.0.1 from https://files.pythonhosted.org/packages/4a/a1/8a9c9be45c642fa12954855d8b3a02d9fd8551165a558835a19508fec2e6/kiwisolver-1.4.5-cp310-cp310-win_amd64.whl.metadata
  Using cached kiwisolver-1.4.5-cp310-cp310-win_amd64.whl.metadata (6.5 kB)
Collecting packaging>=20.0 (from matplotlib>=3.0->gymnasium[all])
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting pyparsing<3.1,>=2.3.1 (from matplotlib>=3.0->gymnasium[all])
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting python-dateutil>=2.7 (from matplotlib>=3.0->gymnasium[all])
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting decorator<5.0,>=4.0.2 (from moviepy>=1.0.0->gymnasium[all])
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting tqdm<5.0,>=4.11.2 (from moviepy>=1.0.0->gymnasium[all])
  Obtaining dependency information for tqdm<5.0,>=4.11.2 from https://files.pythonhosted.org/packages/00/e5/f12a80907d0884e6dff9c16d0c0114d81b8cd07dc3ae54c5e962cc83037e/tqdm-4.66.1-py3-none-any.whl.metadata
  Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
Collecting requests<3.0,>=2.8.1 (from moviepy>=1.0.0->gymnasium[all])
  Obtaining dependency information for requests<3.0,>=2.8.1 from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting proglog<=1.0.0 (from moviepy>=1.0.0->gymnasium[all])
  Using cached proglog-0.1.10-py3-none-any.whl (6.1 kB)
Collecting imageio-ffmpeg>=0.2.0 (from moviepy>=1.0.0->gymnasium[all])
  Using cached imageio_ffmpeg-0.4.8-py3-none-win_amd64.whl (22.6 MB)
Collecting absl-py (from mujoco>=2.3.3->gymnasium[all])
  Using cached absl_py-1.4.0-py3-none-any.whl (126 kB)
Collecting glfw (from mujoco>=2.3.3->gymnasium[all])
  Obtaining dependency information for glfw from https://files.pythonhosted.org/packages/e5/fb/819923400b06aaf5604c62ffc35aa9f37340b2b4ec6e1d7399b1ec2408be/glfw-2.6.2-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-win_amd64.whl.metadata
  Using cached glfw-2.6.2-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-win_amd64.whl.metadata (5.4 kB)
Collecting pyopengl (from mujoco>=2.3.3->gymnasium[all])
  Obtaining dependency information for pyopengl from https://files.pythonhosted.org/packages/99/48/00e31747821d3fc56faddd00a4725454d1e694a8b67d715cf20f531506a5/PyOpenGL-3.1.7-py3-none-any.whl.metadata
  Using cached PyOpenGL-3.1.7-py3-none-any.whl.metadata (3.2 kB)
Collecting cffi>=1.10 (from mujoco-py<2.2,>=2.1->gymnasium[all])
  Using cached cffi-1.15.1-cp310-cp310-win_amd64.whl (179 kB)
Collecting fasteners~=0.15 (from mujoco-py<2.2,>=2.1->gymnasium[all])
  Using cached fasteners-0.18-py3-none-any.whl (18 kB)
Collecting ale-py~=0.8.1 (from shimmy[atari]<1.0,>=0.1.0->gymnasium[all])
  Using cached ale_py-0.8.1-cp310-cp310-win_amd64.whl (952 kB)
Requirement already satisfied: filelock in c:\users\tom_n\gym\env\lib\site-packages (from torch>=1.0.0->gymnasium[all]) (3.12.2)
Collecting sympy (from torch>=1.0.0->gymnasium[all])
  Using cached sympy-1.12-py3-none-any.whl (5.7 MB)
Collecting networkx (from torch>=1.0.0->gymnasium[all])
  Using cached networkx-3.1-py3-none-any.whl (2.1 MB)
Collecting jinja2 (from torch>=1.0.0->gymnasium[all])
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting importlib-resources (from ale-py~=0.8.1->shimmy[atari]<1.0,>=0.1.0->gymnasium[all])
  Obtaining dependency information for importlib-resources from https://files.pythonhosted.org/packages/25/d4/592f53ce2f8dde8be5720851bd0ab71cc2e76c55978e4163ef1ab7e389bb/importlib_resources-6.0.1-py3-none-any.whl.metadata
  Using cached importlib_resources-6.0.1-py3-none-any.whl.metadata (4.0 kB)
Collecting pycparser (from cffi>=1.10->mujoco-py<2.2,>=2.1->gymnasium[all])
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib>=3.0->gymnasium[all])
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting charset-normalizer<4,>=2 (from requests<3.0,>=2.8.1->moviepy>=1.0.0->gymnasium[all])
  Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/5c/f2/f3faa20684729d3910af2ee142e30432c7a46a817eadeeab87366ed87bbb/charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl.metadata
  Using cached charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl.metadata (31 kB)
Collecting idna<4,>=2.5 (from requests<3.0,>=2.8.1->moviepy>=1.0.0->gymnasium[all])
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<3,>=1.21.1 (from requests<3.0,>=2.8.1->moviepy>=1.0.0->gymnasium[all])
  Obtaining dependency information for urllib3<3,>=1.21.1 from https://files.pythonhosted.org/packages/9b/81/62fd61001fa4b9d0df6e31d47ff49cfa9de4af03adecf339c7bc30656b37/urllib3-2.0.4-py3-none-any.whl.metadata
  Using cached urllib3-2.0.4-py3-none-any.whl.metadata (6.6 kB)
Collecting certifi>=2017.4.17 (from requests<3.0,>=2.8.1->moviepy>=1.0.0->gymnasium[all])
  Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl.metadata
  Using cached certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Collecting colorama (from tqdm<5.0,>=4.11.2->moviepy>=1.0.0->gymnasium[all])
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch>=1.0.0->gymnasium[all])
  Obtaining dependency information for MarkupSafe>=2.0 from https://files.pythonhosted.org/packages/84/a8/c4aebb8a14a1d39d5135eb8233a0b95831cdc42c4088358449c3ed657044/MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl.metadata
  Using cached MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl.metadata (3.1 kB)
Collecting mpmath>=0.19 (from sympy->torch>=1.0.0->gymnasium[all])
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Using cached Cython-0.29.36-py2.py3-none-any.whl (988 kB)
Using cached imageio-2.31.2-py3-none-any.whl (313 kB)
Using cached jaxlib-0.4.14-cp310-cp310-win_amd64.whl (40.4 MB)
Using cached matplotlib-3.7.2-cp310-cp310-win_amd64.whl (7.5 MB)
Using cached mujoco-2.3.7-cp310-cp310-win_amd64.whl (3.3 MB)
Using cached opencv_python-4.8.0.76-cp37-abi3-win_amd64.whl (38.1 MB)
Using cached pygame-2.5.1-cp310-cp310-win_amd64.whl (10.6 MB)
Using cached contourpy-1.1.0-cp310-cp310-win_amd64.whl (470 kB)
Using cached fonttools-4.42.1-cp310-cp310-win_amd64.whl (2.1 MB)
Using cached glfw-2.6.2-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-win_amd64.whl (493 kB)
Using cached kiwisolver-1.4.5-cp310-cp310-win_amd64.whl (56 kB)
Using cached ml_dtypes-0.2.0-cp310-cp310-win_amd64.whl (938 kB)
Using cached Pillow-10.0.0-cp310-cp310-win_amd64.whl (2.5 MB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached scipy-1.11.2-cp310-cp310-win_amd64.whl (44.0 MB)
Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
Using cached PyOpenGL-3.1.7-py3-none-any.whl (2.4 MB)
Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Using cached charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl (96 kB)
Using cached MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl (17 kB)
Using cached urllib3-2.0.4-py3-none-any.whl (123 kB)
Using cached importlib_resources-6.0.1-py3-none-any.whl (34 kB)
Building wheels for collected packages: box2d-py
  Building wheel for box2d-py (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Using setuptools (version 67.7.2).
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\Box2D
      copying library\Box2D\Box2D.py -> build\lib.win-amd64-cpython-310\Box2D
      copying library\Box2D\__init__.py -> build\lib.win-amd64-cpython-310\Box2D
      creating build\lib.win-amd64-cpython-310\Box2D\b2
      copying library\Box2D\b2\__init__.py -> build\lib.win-amd64-cpython-310\Box2D\b2
      running build_ext
      building 'Box2D._Box2D' extension
      swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
      swig.exe -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library\Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp Box2D\Box2D.i
      error: command 'swig.exe' failed: None
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for box2d-py
  Running setup.py clean for box2d-py
Failed to build box2d-py
ERROR: Could not build wheels for box2d-py, which is required to install pyproject.toml-based projects
pseudo-rnd-thoughts commented 1 year ago

gymasium[all] won't install stable-retro and the error says that error: command 'swig.exe' failed: None so you need to install swig, https://www.swig.org/download.html

Tom-Neverwinter commented 1 year ago
Install SWIG:
If you haven't installed SWIG yet, you can download it from SWIG's official website. After downloading, extract the files to a directory, e.g., C:\swig.

Add SWIG to the PATH:

If you're on Windows:
Right-click on the Windows start button and choose System.
Click on Advanced system settings.
In the System Properties window, click on the Environment Variables button.
In the Environment Variables window, highlight the Path variable in the "System variables" section and click the Edit button.
In the Edit Environment Variable window, click the New button and then paste in the path to the directory where you extracted SWIG, e.g., C:\swig.
Click OK to close each of the windows.

PATH:
C:\ENV ITEMS\swigwin-4.1.1
NAME:
C:\ENV ITEMS\swigwin-4.1.1\swig.exe

pip install virtualenv
mkdir GYM
cd GYM
virtualenv env
env\Scripts\activate

set PATH=C:\ENV ITEMS\swigwin-4.1.1;%PATH%

pip install cmake wheel
pip install "gymnasium[all]"

pip install cmake wheel
pip install "gymnasium[all]"
RAW Paste Data 
Tom-Neverwinter commented 1 year ago

please add install instructions to wiki