Not sure if this is the right avenue but I'm hoping someone can help. I'm trying to run experiments on a CentOS cluster provided by our school. The minimal installation of gym works, however, I need the atari games for my experiments. However, close to the end of the installation, I get this error below.
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].)
cmake is installed, and zlib is installed and is located in /usr/lib/libz.so
There's probably a more useful error message higher up in the log. Could you paste the entire output of the install command?
Attach is the log. I've tried installing it for both python2.7 and 3.5. Also, I have tried just installing https://github.com/openai/atari-py repo by itself and I still couldn't do it.
Lines like
main.cpp:(.text+0x57): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
indicate something broken with your C++ installation -- it can't find implementations of string classes.
It's not a general incompatibility with CentOS. I set up a local CentOS container and installing it worked OK. Starting with docker run -ti centos:latest bash, I ran:
yum install -y epel-release
yum repolist
yum install python-pip gcc gcc-c++ python-devel make cmake zlib-devel git
pip install numpy
cd /root
git clone https://github.com/openai/atari-py
cd atari-py
python setup.py build install
and it installed without errors.
It may be that your C++ compiler needs some extra flags to load the right libraries. You should be able to find the exact command that's failing in your atari-py/atari_py/ale_interface/build/CMakeFiles/ale-bin.dir/link.txt. Try running that command and adding -lc++ or -lstdc++ and see if that fixes it.
I'm getting close to resolving this problem. Just need to verify if it's running correctly. So I've cloned gym repo. Then instead of using pip install, I'm doing the python setup.py installation.
I was able to successfully install gym using python setup.py build install. However, I want to make sure this is not a problem. On my local Ubuntu computer, I get this result:
>>> import gym
>>> gym.make('Pong-v0')
[2017-02-20 21:10:22,402] Making new env: Pong-v0
**<gym.envs.atari.atari_env.AtariEnv object at 0x7f261a5ed400>**
But in Cent OS, I get this result:
>>> import gym
>>> gym.make('Pong-v0')
[2017-02-20 21:35:59,252] Making new env: Pong-v0
**<TimeLimit<AtariEnv instance>>**
Is this a problem? I'm using Python 3.4 in Ubuntu, and Python 3.5 in CentOS.
This changed recently: the TimeLimit wrapper was added to the github master on Feb 1.
@gabrieledcjr Can you share the steps necessary to build on CentOS, to add to our FAQ?
Most helpful comment
Lines like
indicate something broken with your C++ installation -- it can't find implementations of string classes.
It's not a general incompatibility with CentOS. I set up a local CentOS container and installing it worked OK. Starting with
docker run -ti centos:latest bash, I ran:and it installed without errors.
It may be that your C++ compiler needs some extra flags to load the right libraries. You should be able to find the exact command that's failing in your
atari-py/atari_py/ale_interface/build/CMakeFiles/ale-bin.dir/link.txt. Try running that command and adding-lc++or-lstdc++and see if that fixes it.