ViZDoom安装

官网:https://github.com/mwydmuch/ViZDoom/blob/master/doc/Building.md

 

环境:ubuntu16, python2.7, Anaconda2

 

1.首先安装依赖

# ZDoom dependencies
sudo apt-get install build-essential zlib1g-dev libsdl2-dev libjpeg-dev \
nasm tar libbz2-dev libgtk2.0-dev cmake git libfluidsynth-dev libgme-dev \
libopenal-dev timidity libwildmidi-dev 

# Boost libraries
sudo apt-get install libboost-all-dev

# Python 2 dependencies
sudo apt-get install python-pip
pip install numpy
# or install Anaconda 2 and add it to PATH

# Python 3 dependencies
sudo apt-get install python3-pip 
pip3 install numpy
# or install Anaconda 3 and add it to PATH

# Lua binding dependencies
sudo apt-get install liblua5.1-dev 
# Lua shipped with Torch can be used instead, so it isn't needed if installing via LuaRocks

 2.然后克隆git,我这里克隆的是自带boost版本

git clone https://github.com/mwydmuch/ViZDoom -b local_boost_python

 

3.保证能翻过那高高的墙,因为程序要下载freedoom-0.10.1.zip

 

4.执行./cmake_clean.sh清除,再执行./cmake_all.sh,再执行make -j32 这样保证这个源码能顺利编译通过。也最好预先装好numpy。

 

5.如果能编译通过,则执行sudo -H pip install .

这里我们假设已经安装好numpy, python在/usr/bin/python,pip在/usr/local/bin/pip,那么装好后的vizdoom在/usr/local/lib/python2.7/dist-packages/vizdoom下。

 

6.如果使用anaconda, 环境为tf1.2,那么把/usr/local/lib/python2.7/dist-packages/vizdoom拷贝到/home/hsy/anaconda2/envs/tf1.2/lib/python2.7/site-packages下面即可

cp -r /usr/local/lib/python2.7/dist-packages/vizdoom /home/hsy/anaconda2/envs/tf1.2/lib/python2.7/site-packages

 

posted @ 2017-07-07 23:06  Shiyu_Huang  阅读(2358)  评论(1编辑  收藏  举报