-
Notifications
You must be signed in to change notification settings - Fork 46
Install Malmo
Please see the following 4 alternatives:
pip3 install malmo
Create or change into a working directory where you would like Malmo to be installed (in a sub directory named MalmoPlatform) and do:
python3 -c "import malmo.minecraftbootstrap; malmo.minecraftbootstrap.download(branch='malmorel')"
Please make sure you have git installed. This command will create a new directory (called MalmoPlatform) containing the Malmo GitHub project in your (current) working directory. By default, the master branch is downloaded. You can specify a branch using a string keyword argument (named branch) to the download function - which can be necessary if the malmo package was not installed recently and the download is for some reason done again.
Please remember to set up the MALMO_XSD_PATH environment variable to point to the MalmoPlatform/Schemas directory. i.e. full path of working dir and MalmoPlatform/Schemas.
You can now launch Minecraft from your working directory:
python3 -c "import malmo.minecraftbootstrap; malmo.minecraftbootstrap.launch_minecraft()"
This may take some time (minutes if it's the first run as it needs to build Minecraft Forge).
The malmo package includes a simple test mission which you can run as follows:
python3 -c "from malmo.run_mission import run; run()"
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
Assuming you have Anaconda installed :
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
conda install -c crowdai malmo
conda install gcc psutil
pip install pygame
To check that Malmo is installed correctly, just do:
python -c "import MalmoPython" #for use of the Python API
malmo-server -port 10000 # For launching the Minecraft client
This might take a few seconds on the first execution. So hang in there.
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.
Once Malmo is installed, you can now proceed to install MARLO.