Coder Social home page Coder Social logo

Installation fail on Mac M1 about retro HOT 11 OPEN

theaveasso avatar theaveasso commented on July 17, 2024
Installation fail on Mac M1

from retro.

Comments (11)

ryneandal avatar ryneandal commented on July 17, 2024 3

I was able to install it in a python 3.8 conda environment using the v0.8.0 tag on an M1 Pro:
image

I pulled down the repo, checked out the aforementioned tag, then commented out this line: https://github.com/openai/retro/blob/v0.8.0/CMakeLists.txt#L155. I noticed that the failures were beginning around the building of gambatte and wasn't interested in that core anyway.

After doing so, I was able to follow the build from source instructions in the docs:

  1. Install the Python CMake packge: pip install cmake
  2. Install Lua 5.1 via Homebrew: brew install pkg-config [email protected]
  3. Run CMake: cmake . -DCMAKE_PREFIX_PATH=/usr/local/opt/qt -DBUILD_UI=ON -UPYLIB_DIRECTORY
  4. Run Make: make -j$(sysctl hw.ncpu | cut -d: -f2)
  5. Install Python package via pip from local source: pip install -e .

{% note %}
I had to roll back to OpenAI Gym v0.22.0 due to fundamental changes re: seeding -- pip install gym==0.22.0
{% endnote %}

If all goes well, you should end up with a running version of Retro Gym on your Apple Silicon:
image

from retro.

Fedjurrui avatar Fedjurrui commented on July 17, 2024 1

I was having the same issue, and for me rebuilding the environment in conda exclusively with python 3.8 worked. Seems like miniforge is using python 3.9 for the installation which is not compatible with the latest build. Try building a venv with python 3.8.

File "/Users/theaveasso/miniforge3/envs/introRL/lib/python3.9/site-packages/setuptools/_distutils/command/install.py", line 670, in run
self.run_command('build')

from retro.

bsotelo22 avatar bsotelo22 commented on July 17, 2024 1

I'm trying to follow @ryneandal steps by I'm having a problem when running first cmake command:

"CMake Error at src/ui/CMakeLists.txt:1 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5Gui" with any
of the following names:

Qt5GuiConfig.cmake
qt5gui-config.cmake

Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
"

Does someone know how to solve it? Thanks a lot !

from retro.

abhihjoshi avatar abhihjoshi commented on July 17, 2024 1

I am running into the same issue as @bsotelo22. Does anyone know how to properly install qt for this purpose? I have already brew installed qt@5 on my machine, but am still getting this error.

from retro.

zbeucler2018 avatar zbeucler2018 commented on July 17, 2024 1

@borishim @awesome-aj0123 @

I was able to get gym-retro working on my M1 macbook air running Ventura and python3.10 (not using miniforge though)

Build from source

  1. Clone this fork of gym-retro
    • NOTICE: This fork uses Gymnasium instead of Gym
  2. pip install cmake wheel
  3. brew install pkg-config [email protected] libzip qt5 capnp
  4. echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc
  5. export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) # tells compiler where to find mac sdk
    • I had to run this since I was getting the same errors as OP where CMake was looking in the wrong place for the SDKs)
  6. pip install -e .

build UI

  1. build package from source
  2. cmake . -DCMAKE_PREFIX_PATH=/usr/local/opt/qt -DBUILD_UI=ON -UPYLIB_DIRECTORY
  3. make -j$(sysctl hw.ncpu | cut -d: -f2)
  4. open "Gym Retro Integration.app"

I also have a wheel file that I can offer if people are interested

from retro.

MatPoliquin avatar MatPoliquin commented on July 17, 2024 1

@joezou You can use a maintained fork https://github.com/Farama-Foundation/stable-retro, it supports M1

from retro.

theaveasso avatar theaveasso commented on July 17, 2024

I could find my way around using miniconda3 or ven with python 3.8 like you said, but it would be cool if I can utilize the gpu.

from retro.

borishim avatar borishim commented on July 17, 2024

Iā€™m still having this issue even with 3.8.
I created an env with
conda create -n myenv python=3.8
followed by conda activate myenv
then pip install gym-retro and ended up with the same errors. How did you work around this issue?

from retro.

ryneandal avatar ryneandal commented on July 17, 2024

Let me go over my notes tonight after work and I'll see if I can identify a missed step in my instructions.

from retro.

joezou avatar joezou commented on July 17, 2024

I was having the same issue, and for me rebuilding the environment in conda exclusively with python 3.8 worked. Seems like miniforge is using python 3.9 for the installation which is not compatible with the latest build. Try building a venv with python 3.8.

I follow your steps, but I failed to install gym-retro on my Mac M1 Pro. Environment: Ventura 13.4, Python 3.8.16.
How can you install the gym-retro on Mac M1 successfully? Pls list detailed steps, thx.

from retro.

zell1988 avatar zell1988 commented on July 17, 2024

I'm trying to follow @ryneandal steps by I'm having a problem when running first cmake command:

"CMake Error at src/ui/CMakeLists.txt:1 (find_package): By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Gui", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Gui" with any of the following names:

Qt5GuiConfig.cmake
qt5gui-config.cmake

Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set "Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui" provides a separate development package or SDK, be sure it has been installed. "

Does someone know how to solve it? Thanks a lot !

I had the same output message like yours.
then I did "brew install qt5" and change the path in step 3 to
/opt/homebrew/opt/qt@5 with success.
hope this could help.

from retro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.