安装ale_python_interface时遇到make错误
1、
首先按照https://pypi.org/project/ale-python-interface/0.0.1/来安装,直接python3 -m pip

但提示缺少一个头文件ale_c_wrapper.h,报错如下:
ale_python_interface/ale_c_wrapper.cpp::: fatal error: ale_c_wrapper.h: No such file or directory
#include "ale_c_wrapper.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status
不过这个网上有一个blog写到这个问题,不过他的方法我试了不可以,你们可以试试:https://blog.csdn.net/senjie_wang/article/details/84073823
2、
然后按照https://github.com/bbitmaster/ale_python_interface/wiki/Installation-Instructions,来安装。
结果在第一大步的最后一小步,make时出错,报错如下:
MsPacman.cpp:(.text+0x18a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
MsPacman.cpp:(.text+0x1da): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
MsPacman.cpp:(.text+0x1c2): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/NameThisGame.o: In function `NameThisGameSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
NameThisGame.cpp:(.text+0x172): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
NameThisGame.cpp:(.text+0x193): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Pong.o: In function `PongSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Pong.cpp:(.text+0x152): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Pong.cpp:(.text+0x173): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Pooyan.o: In function `PooyanSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Pooyan.cpp:(.text+0x18a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Pooyan.cpp:(.text+0x1ab): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/PrivateEye.o: In function `PrivateEyeSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
PrivateEye.cpp:(.text+0x152): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
PrivateEye.cpp:(.text+0x173): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/SpaceInvaders.o: In function `SpaceInvadersSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
SpaceInvaders.cpp:(.text+0x192): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
SpaceInvaders.cpp:(.text+0x1b3): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/StarGunner.o: In function `StarGunnerSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
StarGunner.cpp:(.text+0x1e2): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
StarGunner.cpp:(.text+0x203): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Tennis.o: In function `TennisSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Tennis.cpp:(.text+0x1da): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Tennis.cpp:(.text+0x1fb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Tutankham.o: In function `TutankhamSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Tutankham.cpp:(.text+0x1aa): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Tutankham.cpp:(.text+0x1cb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/VideoPinball.o: In function `VideoPinballSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
VideoPinball.cpp:(.text+0x19a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
VideoPinball.cpp:(.text+0x1bb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/YarsRevenge.o: In function `YarsRevengeSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
YarsRevenge.cpp:(.text+0x171): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
YarsRevenge.cpp:(.text+0x199): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
YarsRevenge.cpp:(.text+0x1b9): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Zaxxon.o: In function `ZaxxonSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Zaxxon.cpp:(.text+0x149): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Zaxxon.cpp:(.text+0x169): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/environment/stella_environment.o: In function `StellaEnvironment::getWrapper()':
stella_environment.cpp:(.text+0x7ae): undefined reference to `StellaEnvironmentWrapper::StellaEnvironmentWrapper(StellaEnvironment&)'
collect2: error: ld returned exit status
makefile:: recipe for target 'ale' failed
make: *** [ale] Error
从这个报错中,就可以发现,基本就是StellaEnvironmentWrapper::* 什么什么没有定义。
终于找到相关的文件stella_environment_wrapper.cpp 和 stella_environment_wrapper.hpp
在下载的文件Arcade-Learning-Environment的./src/environment/目录下面。
从下面截图就能发现很奇怪,在make一遍后,相关文件都被编译成.o文件了,却没有stella_environment_wrapper.o文件:

于是打开这个目录里面的module.mk文件:$ vi module.mk

为什么只产生三个.o文件,不生成stella_environment_wrapper.o文件啊。
于是把它改成:

就是多加了一行,生成对应的stella_environment_wrapper.o文件。
然后再返回到Arcade-Learning-Environment目录,然后再执行一遍make。
再执行一遍$ ls,看到当前目录下有libale.so,就成功了

OK
done.
Reference:
https://github.com/bbitmaster/ale_python_interface/issues/7
安装ale_python_interface时遇到make错误的更多相关文章
- 安装APK时引发INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误的几种可能(申明:来源于网络)
安装APK时引发INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误的几种可能(申明:来源于网络) 地址:https://my.oschina.net/freestyle ...
- 安装node-sass时出现的错误解决方案(Mac自用,也可以借鉴)
安装node-sass时出现一下错误: gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir ...
- apt-get install安装软件时出现依赖错误解决方式
在使用apt-get install安装软件时,常常会遇到如上图所看到的错误.该错误的意思为缺少依赖软件.解决方式为: aptitude install golang-go
- 安装pandas时出现环境错误
在安装pandas时出现Could not install packages due to an EnvironmentErrorConsider using the `--user` option ...
- 安装Caffe时出现的错误
一.error MSB3073类错误 一般是由于CommonSettings.props配置出现错误. 第一处是你安装CUDA的版本号,第二次是你安装cudnn的路径. 也可参照http://blog ...
- yum install错误 系统环境:Oracle Linux5.4 在通过yum安装软件时出现以下错误:
1.yum配置文件 1 [root@rh168 yum.repos.d]# cat yum.repo 2 [base] 3 name=Oracle linux 4 baseurl=file:/// ...
- 安装VisualStudio时失败,错误信息安装包失败或证书不在有效期内
本人安装VisualStudio2012的时候,安装失败有:错误信息安装包失败或证书不在有效期内等 网上查找相关信息,得到的答案很少,我重新网上下载同版本软件继续之前的下载,但还是无效 之后我把软件卸 ...
- 安装Office2007时出现1706错误的解决方案
前几天,重做了系统.周末因为接到一笔单子,很兴奋啊.第一次接到私活.然后就装Office2007,打算看需求的.居然安装的时候出现错误,提示1706错误,后面一串错误信息,也懒得看,以为是文件坏了. ...
- Ubuntu16.04安装truffle时的一些错误
1.使用truffle时出现 Error: /usr/bin/env: node: 没有那个文件或目录 1.如果是用sudo apt-get install nodejs命令安装的nodejs, ub ...
随机推荐
- java多线程开发之CyclicBarrier,CountDownLatch
最近研究了一个别人的源码,其中用到多个线程并行操作一个文件,并且在所有线程全部结束后才进行主线程后面的处理. 其用到java.util.concurrent.CyclicBarrier 这个类. Cy ...
- github 相关操作知识
新设备上使用github 1.要在本地创建一个ssh key ssh-keygen -t rsa -C "email address" 2.界面提示进入.ssh文件夹下,找到id_ ...
- java并发编程(2)线程池的使用
一.任务和执行策略之间的隐性耦合 Executor可以将任务的提交和任务的执行策略解耦 只有任务是同类型的且执行时间差别不大,才能发挥最大性能,否则,如将一些耗时长的任务和耗时短的任务放在一个线程池, ...
- access 2010,语文
access 2010*(报表) 使用报表创建:打开需要创建图形的报表----创建----报表----完成. 使用报表向导创建:创建----报表向导----选择表/查询----选择字段----设置分布 ...
- npm proxy报错处理
npm经常抽风,动不动安装一个模块就这样了: 提示是否设置了正确的代理地址,解决方法网上有很多,有说取消代理.重新设置代理等等,最简单粗暴解决: 删除nodejs安装路径下面的npmrc文件,再使用淘 ...
- 【转】Encrypt ConnectionString in Web.Config 【加密ASP.NET web.config数据库链接字串】
原文链接:https://www.codeproject.com/Tips/795135/Encrypt-ConnectionString-in-Web-Config web.config中一般会存放 ...
- PLSQL-12.0.7.1837注册码
product code: 4vkjwhfeh3ufnqnmpr9brvcuyujrx3n3le serial Number:226959 password: xs374ca LicenseNumbe ...
- Java基础(五)面对对象
一.面向对象 面向对象 : 就是一种编程思想 1.类和对象 类是指描述一类事物,或者看成是一个分类,可以把类看作构造对象的模板. 对象是指具体的个体(也叫实例-instance).创建对象使用 new ...
- java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.yunweather.app.db.YunWeatherDB.loadProvinces()' on a null object reference
NullPointerException:查看自己的什么地方是否对空指针进行了操作 Attempt to invoke virtual method 'java.util.List com.yunwe ...
- linux下查看内存的使用情况
windows上有各种软件可以进行“一键加速”之类的操作,释放掉一些内存(虽然我暂时不知道是怎么办到的,有待后续学习).而任务管理器也可以很方便地查看各进程使用的内存情况,如下图: 同样地,linux ...