10 Replies Latest reply on Jul 2, 2018 12:03 AM by Intel Corporation

    Install openAI GYM

    amitsome

      Hi, I tried to install the openai gym library on the colfaxresearch platform

       

      I ran this command:

       

      !pip3.6 install --user "gym[atari]"==0.9.5

       

      and obtained the following error:

      ollecting gym[atari]==0.9.5

      Requirement already satisfied: requests>=2.0 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) (2.18.4)

      Requirement already satisfied: pyglet>=1.2.0 in ./.local/lib/python3.6/site-packages (from gym[atari]==0.9.5) (1.3.2)

      Requirement already satisfied: numpy>=1.10.4 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) (1.14.0)

      Requirement already satisfied: six in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) (1.10.0)

      Collecting PyOpenGL; extra == "atari" (from gym[atari]==0.9.5)

      Requirement already satisfied: Pillow; extra == "atari" in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) (4.2.1)

      Collecting atari-py>=0.1.1; extra == "atari" (from gym[atari]==0.9.5)

        Using cached https://files.pythonhosted.org/packages/8b/38/3c6716ac9031a686cc3228f3855e48c08a40e4d7c490dd4c21c65b465205/atari-py-0.1.1.tar.gz

      Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) (3.0.4)

      Requirement already satisfied: idna<2.7,>=2.5 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) (2.6)

      Requirement already satisfied: urllib3<1.23,>=1.21.1 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) (1.22)

      Requirement already satisfied: certifi>=2017.4.17 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) (2018.1.18)

      Requirement already satisfied: future in ./.local/lib/python3.6/site-packages (from pyglet>=1.2.0->gym[atari]==0.9.5) (0.16.0)

      Requirement already satisfied: olefile in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from Pillow; extra == "atari"->gym[atari]==0.9.5) (0.44)

      Building wheels for collected packages: atari-py

        Running setup.py bdist_wheel for atari-py ... error

        Complete output from command /glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /home/u15095/tmp/pip-wheel-tm59_wm9 --python-tag cp36:

        running bdist_wheel

        running build

        make: Entering directory `/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/atari_py/ale_interface'

        mkdir -p build && cd build && cmake .. && make -j4

        /bin/sh: cmake: command not found

        make: *** [build] Error 127

        make: Leaving directory `/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/atari_py/ale_interface'

        Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)

        Traceback (most recent call last):

        File "<string>", line 1, in <module>

        File "/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py", line 36, in <module>

        tests_require=['nose2']

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 179, in run

        self.run_command('build')

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

        File "/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py", line 16, in run

        subprocess.check_call(cmd)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

        subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.

       

        ----------------------------------------

        Failed building wheel for atari-py

        Running setup.py clean for atari-py

      Failed to build atari-py

      tensorflow 1.3.1 requires tensorflow-tensorboard<0.2.0,>=0.1.0, which is not installed.

      tensorflow 1.3.1 has requirement protobuf>=3.3.0, but you'll have protobuf 3.2.0 which is incompatible.

      Installing collected packages: PyOpenGL, atari-py, gym

        Running setup.py install for atari-py ... error

        Complete output from command /glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/u15095/tmp/pip-record-mlzs2ii8/install-record.txt --single-version-externally-managed --compile --user --prefix=:

        running install

        running build

        make: Entering directory `/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/atari_py/ale_interface'

        mkdir -p build && cd build && cmake .. && make -j4

        /bin/sh: cmake: command not found

        make: *** [build] Error 127

        make: Leaving directory `/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/atari_py/ale_interface'

        Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)

        Traceback (most recent call last):

        File "<string>", line 1, in <module>

        File "/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py", line 36, in <module>

        tests_require=['nose2']

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/core.py", line 148, in setup

        dist.run_commands()

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 955, in run_commands

        self.run_command(cmd)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run

        return orig.install.run(self)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/command/install.py", line 545, in run

        self.run_command('build')

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/cmd.py", line 313, in run_command

        self.distribution.run_command(command)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command

        cmd_obj.run()

        File "/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py", line 16, in run

        subprocess.check_call(cmd)

        File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/subprocess.py", line 291, in check_call

        raise CalledProcessError(retcode, cmd)

        subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.

        

        ----------------------------------------

      Command "/glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-install-hwi7eo5v/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/u15095/tmp/pip-record-mlzs2ii8/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /home/u15095/tmp/pip-install-hwi7eo5v/atari-py/

        • 1. Re: Install openAI GYM
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi
          Please try the following:
          1. Change the kernel to Python 3 (Intel 2018 update 2)
          2. run the command !pip install --user "gym[atari]"==0.9.5

          Regarding pip3.6 did you install 3.6 in your environment?

          Thanks
           

          • 2. Re: Install openAI GYM
            amitsome

            I performed an upgrade to pip,

            now it doesn't work as performing:

            !pip

             

            results in

             

            raceback (most recent call last): File "/glob/intel-python/python3/bin/pip", line 6, in <module> sys.exit(pip.main()) AttributeError: module 'pip' has no attribute 'main' 

             

             

            In [ ]:

             

             

             

             

             

            • 3. Re: Install openAI GYM
              amitsome

              UPDATE:** I used a local version of pip, now I removed it and i'm using the gloabl one in /glob/intel-python/python3/bin/pip

               

              Anyway, I am using the update 2 python 3 kernel, and executed the exact same command !pip install --user "gym[atari]"==0.9.5

              Yet I'm still getting the same error (attached screenshot)

              • 4. Re: Install openAI GYM
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi 
                The error screen doesnt show complete the error text. Can you please copy the entire error text and post it here.

                thanks

                • 5. Re: Install openAI GYM
                  amitsome

                  Its exactly the same error:

                   

                   

                  Collecting gym[atari]==0.9.5 Requirement already satisfied: numpy>=1.10.4 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) Requirement already satisfied: requests>=2.0 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) Requirement already satisfied: six in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) Requirement already satisfied: pyglet>=1.2.0 in ./.local/lib/python3.6/site-packages (from gym[atari]==0.9.5) Requirement already satisfied: Pillow; extra == "atari" in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from gym[atari]==0.9.5) Collecting atari-py>=0.1.1; extra == "atari" (from gym[atari]==0.9.5) Using cached https://files.pythonhosted.org/packages/8b/38/3c6716ac9031a686cc3228f3855e48c08a40e4d7c490dd4c21c65b465205/atari-py-0.1.1.tar.gz Requirement already satisfied: PyOpenGL; extra == "atari" in ./.local/lib/python3.6/site-packages (from gym[atari]==0.9.5) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) Requirement already satisfied: idna<2.7,>=2.5 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) Requirement already satisfied: urllib3<1.23,>=1.21.1 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) Requirement already satisfied: certifi>=2017.4.17 in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from requests>=2.0->gym[atari]==0.9.5) Requirement already satisfied: future in ./.local/lib/python3.6/site-packages (from pyglet>=1.2.0->gym[atari]==0.9.5) Requirement already satisfied: olefile in /glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages (from Pillow; extra == "atari"->gym[atari]==0.9.5) Building wheels for collected packages: atari-py Running setup.py bdist_wheel for atari-py ... error Complete output from command /glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /home/u15095/tmp/tmp9ggl5_jzpip-wheel- --python-tag cp36: running bdist_wheel running build make: Entering directory `/home/u15095/tmp/pip-build-apsv4ug1/atari-py/atari_py/ale_interface' mkdir -p build && cd build && cmake .. && make -j4 /bin/sh: cmake: command not found make: *** [build] Error 127 make: Leaving directory `/home/u15095/tmp/pip-build-apsv4ug1/atari-py/atari_py/ale_interface' Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].) Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py", line 36, in <module> tests_require=['nose2'] File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 179, in run self.run_command('build') File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py", line 16, in run subprocess.check_call(cmd) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.  ----------------------------------------   Failed building wheel for atari-py Running setup.py clean for atari-py Failed to build atari-py Installing collected packages: atari-py, gym Running setup.py install for atari-py ... error Complete output from command /glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/u15095/tmp/pip-kctcyd63-record/install-record.txt --single-version-externally-managed --compile --user --prefix=: running install running build make: Entering directory `/home/u15095/tmp/pip-build-apsv4ug1/atari-py/atari_py/ale_interface' mkdir -p build && cd build && cmake .. && make -j4 /bin/sh: cmake: command not found make: *** [build] Error 127 make: Leaving directory `/home/u15095/tmp/pip-build-apsv4ug1/atari-py/atari_py/ale_interface' Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].) Traceback (most recent call last): File "<string>", line 1, in <module> File "/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py", line 36, in <module> tests_require=['nose2'] File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/core.py", line 148, in setup dist.run_commands() File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/command/install.py", line 545, in run self.run_command('build') File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py", line 16, in run subprocess.check_call(cmd) File "/glob/intel-python/versions/2018u2/intelpython3/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '23']' returned non-zero exit status 2.  ---------------------------------------- Command "/glob/intel-python/versions/2018u2/intelpython3/bin/python -u -c "import setuptools, tokenize;__file__='/home/u15095/tmp/pip-build-apsv4ug1/atari-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /home/u15095/tmp/pip-kctcyd63-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /home/u15095/tmp/pip-build-apsv4ug1/atari-py/ 

                   

                   

                  You are using pip version 9.0.1, however version 10.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
                  • 6. Re: Install openAI GYM
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    We are working on this issue. Will get back.

                    Thanks

                    • 7. Re: Install openAI GYM
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi Amit,

                      Please install cmake using the below command and try to install atari. It will be successful.

                      1. !pip install cmake --user
                      2. !pip install --user "gym[atari]"==0.9.5

                      Thanks,
                      Rajeswari Ponnuru.

                      • 8. Re: Install openAI GYM
                        amitsome

                        Worked like a charm.

                         

                        Thank you!

                        • 9. Re: Install openAI GYM
                          amitsome

                          However,

                          when I run the following command:

                          env = gym.make('Pong-ram-v0')

                           

                          The Python kernel crashes ...

                          • 10. Re: Install openAI GYM
                            Intel Corporation
                            This message was posted on behalf of Intel Corporation

                            Hi Amit,

                            Thanks for confirming. I will close this thread. 
                            Can you please raise a new thread for make issue as it is related with running the program and we have solved installation issues.

                            Thanks,
                            Rajeswari Ponnuru.