k4ntz / OC_Atari

Object Centric Atari games
MIT License
45 stars 8 forks source link

Installation on Mac M1 #24

Closed aarist closed 5 months ago

aarist commented 1 year ago

Hello, after successfully installing the required packages with "pip install ocatari" and "pip install "gymnasium[atari, accept-rom-license]"" on my Mac M1, I wanted to try the demo code

from ocatari.core import OCAtari
import random

env = OCAtari("Pong", mode="ram", hud=True, render_mode="rgb_array")
observation, info = env.reset()
action = random.randint(env.nb_actions-1)
obs, reward, terminated, truncated, info = env.step(action)

however, I get the following error:

zsh: segmentation fault /Users/aarist/miniforge3/envs/oc_atari/bin/python

Any ideas how I can resolve this?

Kind regards Andi

k4ntz commented 1 year ago

Can you give us a bit more indication on where the segmentation fault is being raised ? You can also try to clone the repository and do pip install -e . from inside the OC_Atari folder.

aarist commented 1 year ago

It happens during the import "from ocatari.core import OCAtari". When I run the program, I either receive "zsh: segmentation fault ..." or a "zsh: bus fault ...". There are no further error outputs.

I also set up the Dockerfile, but when I wanted to try the demo it raised the error "AttributeError: module 'cv2.dnn' has no attribute 'DictValue'". After trying to change the opencv version, I now get the following error:

root@f0cd617ee134:~/oc_atari# /bin/python /root/oc_atari/demo_oc_atari.py /usr/local/lib/python3.8/dist-packages/gymnasium/envs/registration.py:521: UserWarning: WARN: Using the latest versioned environment Pong-v4 instead of the unversioned environment Pong. logger.warn( A.L.E: Arcade Learning Environment (version 0.8.1+53f58b7) [Powered by Stella] Undefined mode for information extraction

Edit: Cloning the repository with pip install -e . from inside the OC_Atari folder has the same behavior.

BluemlJ commented 7 months ago

I checked again and cannot reproduce the error.

Undefined mode for information extraction let my think that maybe the extraction method is not set to revised, vision or raw.