openai / retro

Retro Games in Gym
MIT License
3.41k stars 531 forks source link

Import retro: invalid syntax #158

Closed danschmid closed 5 years ago

danschmid commented 5 years ago

I am attempting to install gym-retro and import some ROMs, but when i try to import retro in my python file it throws an error:

Traceback (most recent call last): File "galaga.py", line 1, in import retro File "/home/user/Desktop/retro-gym/gym-retro/retro/init.py", line 2, in import retro.data File "/home/user/Desktop/retro-gym/gym-retro/retro/data/init.py", line 388 def merge(*args, quiet=True): ^ SyntaxError: invalid syntax

While building, i also had an error when I typed "pip3 install -e.":

Rolling back uninstall of gym-retro Command "/home/user/Desktop/retro-gym/bin/python -c "import setuptools, tokenize;file='/home/user/Desktop/retro-gym/gym-retro/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps" failed with error code 1 in /home/user/Desktop/retro-gym/gym-retro/

I made sure to install cmake before running this, and though some other threads reported similar errors, none of those fixes seemed to work for me.

System information

danschmid commented 5 years ago

Nevermind, found out it was because i wasn't executing the code from my virtual environment.