It's UWAweek 48

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Algorithms, Agents and Artificial Intelligence.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 5 articles in this topic
Showing 5 of 292 articles.
Currently 1 other person reading this forum.


 UWA week 33 (2nd semester, week 4) ↓
SVG not supported

Login to reply

👍?
helpful
12:28pm Wed 16th Aug, Matthew C.

What platform are you attempting to install on, and what are the error messages above that one.


SVG not supported

Login to reply

👍?
helpful
2:23pm Wed 16th Aug, ANONYMOUS

I'm attempting to install it on windows through anaconda. Have attempted on multiple version of python. This is my full response after attempting "pip install gym-super-mario-bros":
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 (from gym-super-mario-bros)
  Using cached nes_py-8.2.1.tar.gz (77 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: gym>=0.17.2 in c:\users\kingm\anaconda3\lib\site-packages (from nes-py>=8.1.4->gym-super-mario-bros) (0.26.1)
Requirement already satisfied: numpy>=1.18.5 in c:\users\kingm\anaconda3\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 c:\users\kingm\anaconda3\lib\site-packages (from nes-py>=8.1.4->gym-super-mario-bros) (1.5.21)
Requirement already satisfied: tqdm>=4.48.2 in c:\users\kingm\anaconda3\lib\site-packages (from nes-py>=8.1.4->gym-super-mario-bros) (4.64.1)
Requirement already satisfied: cloudpickle>=1.2.0 in c:\users\kingm\anaconda3\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 c:\users\kingm\anaconda3\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 c:\users\kingm\anaconda3\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 c:\users\kingm\anaconda3\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 c:\users\kingm\anaconda3\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
ERROR: Could not build wheels for nes-py, which is required to install pyproject.toml-based projects


SVG not supported

Login to reply

👍x1
helpful
3:39pm Wed 16th Aug, ANONYMOUS

I think I have resolved the issue with the following steps: First need to install vs code then the "Desktop development with C++" workload I then was able to install g++ with "conda install -c conda-forge cxx-compiler" This then rectified the failed building wheel error and I was able to install nes-py with "pip install nes-py" Then I could install gym-super-mario bros with "pip install gym-super-mario-bros". I think you can just straight install gym-super-mario-bros without separately installing nes-py, but that is how I did it.


SVG not supported

Login to reply

👍x1
helpful
3:39pm Wed 16th Aug, ANONYMOUS

Oops, not vs code, you want microsoft visual studio


SVG not supported

Login to reply

👍?
helpful
5:57pm Thu 17th Aug, ANONYMOUS

I managed to get it working by add the gym channel using - conda install -c conda-forge gym, this then allowed me to install gym-super-mario-bros using conda install gym-super-mario-bros. It also made it easy when it comes to the environment.yml file. I'm not sure about other methods, but this method allowed me to export an environment.yml file which can be used to easily recreate the virtual environment without having to download the gym channel. Someone else can create the virtual environment using "conda env create -f environment.yml".

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  5:07AM Sep 06 2023
Privacy policy