Skip to content

Installation Instructions

diegopliebana edited this page Jul 23, 2018 · 14 revisions

Due to the framework's nature as an wrapper for Malmo, a few steps must be taken in order to be able to boot up and run Marlo.

Marlo requires Python3 and Java8 to be installed. On Windows Python3 MUST be the 64bit version.

1. Install a suitable version of Malmo

Please see the following alternatives:

A) Pip install

pip3 install malmo

B) Malmo repack

This can easily be done by following the step-by-step guide that Malmo provides for Windows, Linux, MacOSX.

Please make sure to download a pre-compiled version of Malmo as posted on the release page as doing this is not the same as downloading the GitHub repository ZIP file. If you choose to download the repository, you will have to build the package yourself which is a lengthier process. If you get errors along the lines of "ImportError: No module named MalmoPython" it will probably be because you have made this mistake.*

Please ensure that all the redistributables that Malmo requires are installed correctly, and that the following entries appear as environment variables:

    * MALMO_XSD_PATH = Malmo_dir\Schemas folder
    * JAVA_HOME = jdk installation folder

C) Via Anaconda

Assuming you have Anaconda installed :

C.1) Env Setup

conda create python=3.6 --name malmo
# you are free to replace '3.6' with python '3.5' or python '2.7'.
# Though only python 3.* versions will be officially supported.
source activate malmo
conda config --add channels conda-forge

C.2) Install malmo

conda install -c crowdai malmo
conda install gcc psutil
pip install pygame

D) Alternatively install malmo from GitHub

If the above fails then you may need to install malmo manually:

Please see Malmo GitHub on how to install Malmo from a binary release or building from source.

On Linux and MacOS, You will need to include the MalmoPython.so library on your PYTHONPATH.

Mincraft can then be launched from the malmo/Minecraft directory using the launchClient.sh or launchClient.bat script with the -port argument specifying the port.

2. Check if Malmo is installed properly

python -c "import MalmoPython" #for use of the Python API
malmo-server -port 10000 # For launching the Minecraft client
# Or if you are not using the conda package, then you are free to launch the minecraft client
# using your method of choice.

# This might take a few seconds on the first execution. So hang in there.

3. Install MARLO

Clone the Marlo repository from this GitHub repository's Master branch and run the setup script:

git clone -b master https://github.com/crowdAI/marLo
cd marlo
python setup.py install

This should install all the required packages for Marlo to function.

In some special circumstances, some packages might fail to install, prompting you to install them yourself. When this happens, the error message usually contains the name and link to the missing packages which you should install using PyPi.

Note: if an import error describing a missing "scoretable" class appears, please downgrade Gym to version 0.7.4 like such: pip install -U gym==0.7.4