在艺术家中安装健身房

时间:2021-11-21 01:20:22

I'm having trouble installing gym-atari in a virtualenv. From what I can tell, it looks like the issue is with zlib, but zlib is installed on the system (so is cmake). Anyone have any ideas? This is on a Gentoo system, for what it's worth:

我在安装健美操时遇到了麻烦。据我所知,看起来问题出在zlib上,但是zlib是安装在系统上的(cmake也是)。谁有什么好主意吗?这是关于Gentoo系统的,它的价值:

(tensorflow)alaya ~ # pip install gym[atari] 
Requirement already satisfied: gym[atari] in     /opt/tensorflow/lib/python2.7/site-packages 
Requirement already satisfied: six in /usr/lib64/python2.7/site-packages (from gym[atari]) 
Requirement already satisfied: requests>=2.0 in /usr/lib64/python2.7/site-packages (from gym[atari]) 
Requirement already satisfied: pyglet>=1.2.0 in /opt/tensorflow/lib/python2.7/site-packages (from gym[atari]) 
Requirement already satisfied: numpy>=1.10.4 in /opt/tensorflow/lib/python2.7/site-packages (from gym[atari]) 
Requirement already satisfied: PyOpenGL; extra == "atari" in /usr/lib64/python2.7/site-packages (from gym[atari]) 
Collecting atari-py>=0.0.17; extra == "atari" (from gym[atari])   Using cached atari-py-0.0.18.tar.gz 
Requirement already satisfied: Pillow; extra == "atari" in /usr/lib64/python2.7/site-packages (from gym[atari]) 
Building wheels for collected packages: atari-py   
Running setup.py bdist_wheel for atari-py ... error   
Complete output from command /opt/tensorflow/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-Xd0Ga4/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 /tmp/tmpCxn1j3pip-wheel- --python-tag cp27: 
. 
. 
.
[  9%] Building CXX object CMakeFiles/ale-bin.dir/src/common/display_screen.cpp.o   
In file included from /tmp/pip-build-Xd0Ga4/atari-py/atari_py/ale_interface/src/emucore/unzip.c:13:0: /tmp/pip-build-Xd0Ga4/atari-py/atari_py/ale_interface/src/emucore/unzip.h:114:45: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'    extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
                                               ^   
/tmp/pip-build-Xd0Ga4/atari-py/atari_py/ale_interface/src/emucore/unzip.h:127:32: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'    extern unzFile ZEXPORT unzOpen OF((const char *path));
                                  ^   
/tmp/pip-build-Xd0Ga4/atari-py/atari_py/ale_interface/src/emucore/unzip.h:138:29: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OF'    extern int ZEXPORT unzClose OF((unzFile file)); 
. . .

Any ideas? My only guess is that somehow zlib isn't getting pulled into the virtualenv??? Maybe it's not even zlib though?

什么好主意吗?我唯一的猜测是,不知何故,zlib没有被拉进virtualenv???也许不是zlib ?

1 个解决方案

#1


3  

O.k., so this was in the end a Gentoo issue -- I'll post the solution in case anyone else has it.

好吧,所以这最终是一个Gentoo问题——我将发布解决方案,以防其他人有它。

Following the instructions here (with atari-py instead of netifaces) I was able to get a version of the package I could edit. I then added the following to the top of /tmp/atari-py-0.0.18/atari_py/ale_interface/src/emucore/unzip.h:

按照这里的说明(使用atariy -py而不是netifaces),我可以获得可以编辑的软件包版本。然后,我在/tmp/atari-py- 0.18/atari_py/ale_interface/src/emucore/unzip.h的顶部添加了以下内容:

/* Gentoo removed OF from their copy of zconf.h     (https://bugs.gentoo.org/show_bug.cgi?id=383179) */
/* but our copy of minizip needs it. */
#ifndef OF
#define OF(args) args
#endif

then running pip install . from /tmp/atari-py-0.0.18 did the trick.

然后运行pip安装。从/tmp/atari-py- 0.18可以看出这一点。

#1


3  

O.k., so this was in the end a Gentoo issue -- I'll post the solution in case anyone else has it.

好吧,所以这最终是一个Gentoo问题——我将发布解决方案,以防其他人有它。

Following the instructions here (with atari-py instead of netifaces) I was able to get a version of the package I could edit. I then added the following to the top of /tmp/atari-py-0.0.18/atari_py/ale_interface/src/emucore/unzip.h:

按照这里的说明(使用atariy -py而不是netifaces),我可以获得可以编辑的软件包版本。然后,我在/tmp/atari-py- 0.18/atari_py/ale_interface/src/emucore/unzip.h的顶部添加了以下内容:

/* Gentoo removed OF from their copy of zconf.h     (https://bugs.gentoo.org/show_bug.cgi?id=383179) */
/* but our copy of minizip needs it. */
#ifndef OF
#define OF(args) args
#endif

then running pip install . from /tmp/atari-py-0.0.18 did the trick.

然后运行pip安装。从/tmp/atari-py- 0.18可以看出这一点。