Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
678 stars 133 forks source link

error while trying to install nes-py #123

Closed PasquBersa closed 1 year ago

PasquBersa commented 1 year ago

I was trying to install nes-py to do some coding but kept encountering the same problem everytime I tried to install it, it says that I need to install Microsoft visual c++ 14 or greater but I already have 14.34 installed, below is the entire cmd process of the installation, the error occurs at the end of it, but just in case I'll leave everything

C:\Users\Pasquale>pip install nes-py Collecting nes-py Downloading nes_py-8.2.1.tar.gz (77 kB) ---------------------------------------- 77.7/77.7 kB 1.4 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting gym>=0.17.2 Downloading gym-0.26.2.tar.gz (721 kB) ---------------------------------------- 721.7/721.7 kB 1.0 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting numpy>=1.18.5 Downloading numpy-1.24.1-cp311-cp311-win_amd64.whl (14.8 MB) ---------------------------------------- 14.8/14.8 MB 696.7 kB/s eta 0:00:00 Collecting pyglet<=1.5.21,>=1.4.0 Downloading pyglet-1.5.21-py3-none-any.whl (1.1 MB) ---------------------------------------- 1.1/1.1 MB 189.0 kB/s eta 0:00:00 Collecting tqdm>=4.48.2 Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB) ---------------------------------------- 78.5/78.5 kB 1.5 MB/s eta 0:00:00 Collecting cloudpickle>=1.2.0 Downloading cloudpickle-2.2.1-py3-none-any.whl (25 kB) Collecting gym-notices>=0.0.4 Downloading gym_notices-0.0.8-py3-none-any.whl (3.0 kB) Collecting colorama Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB) Building wheels for collected packages: gym Building wheel for gym (pyproject.toml) ... done Created wheel for gym: filename=gym-0.26.2-py3-none-any.whl size=827646 sha256=fa1cd54f553ed31f6b83bb242500f9ab927fd117aaa214abebb9383089af069f Stored in directory: c:\users\pasquale\appdata\local\pip\cache\wheels\bf\6b\4b\31afd00fd7e6b9af007bcddfe33e2ff1a1235210639e226214 Successfully built gym Installing collected packages: pyglet, gym-notices, numpy, colorama, cloudpickle, tqdm, gym, nes-py DEPRECATION: nes-py is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for nes-py ... error error: subprocess-exited-with-error

× Running setup.py install for nes-py did not run successfully. │ exit code: 1 ╰─> [23 lines of output] running install C:\Users\Pasquale\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\nes_py copying nes_py\nes_env.py -> build\lib.win-amd64-cpython-311\nes_py copying nes_py_image_viewer.py -> build\lib.win-amd64-cpython-311\nes_py copying nes_py_rom.py -> build\lib.win-amd64-cpython-311\nes_py copying nes_py__init__.py -> build\lib.win-amd64-cpython-311\nes_py creating build\lib.win-amd64-cpython-311\nes_py\app copying nes_py\app\cli.py -> build\lib.win-amd64-cpython-311\nes_py\app copying nes_py\app\play_human.py -> build\lib.win-amd64-cpython-311\nes_py\app copying nes_py\app\play_random.py -> build\lib.win-amd64-cpython-311\nes_py\app copying nes_py\app__init.py -> build\lib.win-amd64-cpython-311\nes_py\app creating build\lib.win-amd64-cpython-311\nes_py\wrappers copying nes_py\wrappers\joypad_space.py -> build\lib.win-amd64-cpython-311\nes_py\wrappers copying nes_py\wrappers\init__.py -> build\lib.win-amd64-cpython-311\nes_py\wrappers running build_ext building 'nes_py.lib_nes_env' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> nes-py

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

Kautenja commented 1 year ago

Looks like you need to install Microsoft VS Studio