1

I am trying to install openai gym on a fresh Ubuntu 16VM. I'm following the documentation to install the Atari package, but I keep running into problems:

When I run ipython > v2.7.12

>import gym >gym.make('SpaceInvaders-v0') 

I get :

.... TypeError: super() takes at least 1 argument (0 given) 

It seems to run python3 code, however, during the installation I used the default settings. When I run

python3 > 3.5.2 > import gym ImportError: No module named 'gym' 

What am I doing wrong? I installed gym into the user environment with pip --user parameters.

Solution: Simple fix to use pip3 which is unfortunately not mentioned in the Readme :(

4
  • 1
    Perhaps try installing to pip3 --user instead of pip --user? Commented Feb 13, 2019 at 1:49
  • Sure! :D I'll try Commented Feb 13, 2019 at 1:54
  • That was it, thank you! Commented Feb 13, 2019 at 2:00
  • 1
    Ok great to hear that it solved your problem! Commented Feb 13, 2019 at 2:39

1 Answer 1

2

To install to a Python3 environment use the following command

pip3 --user

For debugging between Python2 and Python3 pip environments the following commands are often useful:

pip3 --version

pip --version

It prints out the corresponding Python environment that it is attached to

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.