vietnh1009 / Super-mario-bros-A3C-pytorch

Asynchronous Advantage Actor-Critic (A3C) algorithm for Super Mario Bros
MIT License
1.04k stars 230 forks source link

I have installed gym but it shows that I need to install gym_super_mario_bros, I use "pip install gym_super_mario_bros" but I failed ..... #21

Open PatrcikStar opened 1 year ago

PatrcikStar commented 1 year ago

Collecting gym_super_mario_bros Using cached gym_super_mario_bros-7.4.0-py3-none-any.whl (199 kB) Collecting nes-py>=8.1.4 Using cached nes_py-8.2.1.tar.gz (77 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: gym>=0.17.2 in d:\anaconda\lib\site-packages (from nes-py>=8.1.4->gym_super_mario_bros) (0.26.2) Requirement already satisfied: numpy>=1.18.5 in d:\anaconda\lib\site-packages (from nes-py>=8.1.4->gym_super_mario_bros) (1.21.5) Requirement already satisfied: pyglet<=1.5.21,>=1.4.0 in d:\anaconda\lib\site-packages (from nes-py>=8.1.4->gym_super_mario_bros) (1.5.21) Requirement already satisfied: tqdm>=4.48.2 in d:\anaconda\lib\site-packages (from nes-py>=8.1.4->gym_super_mario_bros) (4.64.1) Requirement already satisfied: cloudpickle>=1.2.0 in d:\anaconda\lib\site-packages (from gym>=0.17.2->nes-py>=8.1.4->gym_super_mario_bros) (2.0.0) Requirement already satisfied: gym-notices>=0.0.4 in d:\anaconda\lib\site-packages (from gym>=0.17.2->nes-py>=8.1.4->gym_super_mario_bros) (0.0.8) Requirement already satisfied: importlib-metadata>=4.8.0 in d:\anaconda\lib\site-packages (from gym>=0.17.2->nes-py>=8.1.4->gym_super_mario_bros) (4.11.3) Requirement already satisfied: colorama in d:\anaconda\lib\site-packages (from tqdm>=4.48.2->nes-py>=8.1.4->gym_super_mario_bros) (0.4.5) Requirement already satisfied: zipp>=0.5 in d:\anaconda\lib\site-packages (from importlib-metadata>=4.8.0->gym>=0.17.2->nes-py>=8.1.4->gym_super_mario_bros) (3.8.0) Building wheels for collected packages: nes-py Building wheel for nes-py (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [21 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-39 creating build\lib.win-amd64-cpython-39\nes_py copying nes_py\nes_env.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py_image_viewer.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py_rom.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py__init__.py -> build\lib.win-amd64-cpython-39\nes_py creating build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\cli.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\play_human.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\play_random.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app__init.py -> build\lib.win-amd64-cpython-39\nes_py\app creating build\lib.win-amd64-cpython-39\nes_py\wrappers copying nes_py\wrappers\joypad_space.py -> build\lib.win-amd64-cpython-39\nes_py\wrappers copying nes_py\wrappers\init__.py -> build\lib.win-amd64-cpython-39\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: Failed building wheel for nes-py Running setup.py clean for nes-py Failed to build nes-py Installing collected packages: nes-py, gym_super_mario_bros 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 D:\Anaconda\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-39 creating build\lib.win-amd64-cpython-39\nes_py copying nes_py\nes_env.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py_image_viewer.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py_rom.py -> build\lib.win-amd64-cpython-39\nes_py copying nes_py__init__.py -> build\lib.win-amd64-cpython-39\nes_py creating build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\cli.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\play_human.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app\play_random.py -> build\lib.win-amd64-cpython-39\nes_py\app copying nes_py\app__init.py -> build\lib.win-amd64-cpython-39\nes_py\app creating build\lib.win-amd64-cpython-39\nes_py\wrappers copying nes_py\wrappers\joypad_space.py -> build\lib.win-amd64-cpython-39\nes_py\wrappers copying nes_py\wrappers\init__.py -> build\lib.win-amd64-cpython-39\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.

KeplerBro commented 1 year ago

it looks like that you need to install Microsoft C++ Build Tools. you can get it at https://my.visualstudio.com/Downloads?q=Visual%20C++%20Build%20Tools%20for%20Visual%20Studio%202015%20with%20Update%203, select DVD type and download,install ,than you can fix it.