Gym: Help message to install atari-py fails with zsh

Created on 17 Dec 2019  路  2Comments  路  Source: openai/gym

Operating environment - Running Debian 10 and zsh:

Upon initial installation, when attempting to launch an Atari environment that hasn't been installed, (e.g., MsPacman-v0), the following error message is presented:

(HINT: you can install Atari dependencies by running 'pip install gym[atari]'.)

This is defined in file envs/atari/atari_env.py, on lines 12-13.

The specified install command throws an error:

zsh: no matches found: gym[atari]

The command works fine in Bash. On zsh, it is necessary to use the following:
pip3 install atari-py or pip install atari-py

The help note could be modified to capture the two different options. Or does pip installing atari-py accomplish the same thing in both shells? I don't know if this issue affects other shells.

Most helpful comment

This is a behavior on zsh's side. It doesn't escape square brackets by default, so you'd have to add this to your .zshrc:

alias rake='noglob rake'

Alternatively, you can use either:

pip install gym\[atari\]
pip install 'gym[atari]'

Edit: can't comment on the similarity of the commands, though. I hope someone else can because, in the past, I wasn't aware of this and had to go with pip install atari-py, as well.

All 2 comments

This is a behavior on zsh's side. It doesn't escape square brackets by default, so you'd have to add this to your .zshrc:

alias rake='noglob rake'

Alternatively, you can use either:

pip install gym\[atari\]
pip install 'gym[atari]'

Edit: can't comment on the similarity of the commands, though. I hope someone else can because, in the past, I wasn't aware of this and had to go with pip install atari-py, as well.

pip does recognize pip install 'gym[atari]' correctly. That's the preferred method, because atari extra has some other dependencies (like Pillow and opencv-python).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Spiral-Galaxy picture Spiral-Galaxy  路  3Comments

tylerlekang picture tylerlekang  路  3Comments

lbbc1117 picture lbbc1117  路  3Comments

Ettrig picture Ettrig  路  3Comments

Gawne picture Gawne  路  4Comments