安装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 ...
随机推荐
- Node.js Express4.x生成程序骨架
express 4.x版本中将命令工具分出来了,需要再安装一个命令工具,执行命令“npm install -g express-generator”完成后再测试就可以了. 最后通过"expr ...
- 跨域拦截Access-Control-Allow-Origin设置多个origin
在Extjs和java项目碰到了需要同时处理跨域,外部要访问后台接口的问题 原来的代码是这样,只能设置一个extjs前台需要过滤的跨域请求 package com.xgt.config; import ...
- 周记4——vue中动态添加图片无效、build上线后background-image路径问题
又是一个周五,又一周要过去了...很开心,这周遇到了vue中的一个比较常见的坑,网上随便一搜就有了很多解决方案...“幸运”的是,我选了一个带坑的方案...所以我觉得有必要记录一下这个“坑中坑”... ...
- File.Exists(Application.StartupPath + \\Settings\\Settings.xml)
File.Exists(Application.StartupPath + "\\Settings\\Settings.xml")
- json数据发送时浏览器提示“保存”解决
数据以json形式发送的时候,部分浏览器不能直接解析,而是提示是否保存,nodejs的express应用中可以通过如下代码解决该问题: router.get('/', function (req, r ...
- 在 Azure 上创建和链接 Azure SQL 数据库
本快速入门介绍了如何在 Azure 门户中创建并连接 Azure SQL 数据库.在本教程中完成的所有操作均符合 1 元试用条件. 开始之前 如果您还没有 Azure 账户,可以申请 1 元试用账户. ...
- 梯度寻优与logistic算法
一.一些基本概念 最优化:在给定约束之下如何寻求某些因素(的量),以使某一(或某些)指标达到最优.高中学过的线性规划就是一类典型的最优化问题. 凸集:在集合空间中,凸集就是一个向四周凸起的图形.用数学 ...
- Heka 的编译
Heka是Mozilla开源的,基于Go语言实现的,插件式log收集和分析系统. 已经编译好的 release 版本可以在下面地址下载: https://github.com/mozilla-serv ...
- jquery获取下拉框中的循环值
<select class="test" id="projectno" name="projectno"> <option ...
- vscode 快速生成html
在Hbuilder中新建一个htm自动会生成一个标准的html代码,那在vscode得一行一行写吗?太烦了吧,各种关键词搜,哎妈 终于找到了办法,现在这里记录下: 第一步:在空文档中输入 ! 第二 ...