microsoft / malmo

Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment. --- For installation instructions, scroll down to *Getting Started* below, or visit the project page for more information:
https://www.microsoft.com/en-us/research/project/project-malmo/
MIT License
4.1k stars 600 forks source link

ImportError: libale.so while running python first tutorial? #315

Closed ghost closed 8 years ago

ghost commented 8 years ago

While installing dependence's I have trouble installing these packages

The following extra packages will be installed:
  openjdk-7-jre openjdk-7-jre-headless
Suggested packages:
  openjdk-7-demo openjdk-7-source visualvm icedtea-7-jre-jamvm sun-java6-fonts

The following NEW packages will be installed:
  liblua5.1-0-dev lua5.1 openjdk-7-jdk
The following packages will be upgraded:
  openjdk-7-jre openjdk-7-jre-headless
2 upgraded, 3 newly installed, 0 to remove and 25 not upgraded.
Need to get 55.5 MB/55.7 MB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

When continue it returns a 404 error . I also tried to install openjdk using this `sudo apt-get install openjdk-7-jre' which also returns the same error.

I already installed openjdk from a previous software dependency

$ update-java-alternatives -l
java-1.7.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.7.0-openjdk-amd64
java-8-oracle 1074 /usr/lib/jvm/java-8-oracle

So I installed the cliend ./lauchClient.sh which succefully installed necessary software and at the end opened minecraft

But when I went to python_example folder and ran python tutorial_1.py it returned this error

Traceback (most recent call last):
  File "tutorial_1.py", line 22, in <module>
    import MalmoPython
ImportError: libale.so: cannot open shared object file: No such file or directory

This is a doubt; Do we have to run ./localClient.sh every time and initialize minecraft client before running python script such as tutorial_1.py?

timhutton commented 8 years ago

@potholiday launchClient.sh takes a long time the first time you run it since it needs to download lots of things. It should be faster the next time. If the Minecraft window appears then your JDK installation is good.

The libale.so problem is because you've downloaded a _withALE version of Malmo. ALE is the Arcade Learning Environment which I'm guessing you don't want to use. So either install ALE or just download the other version of Malmo for your platform.

Let me know if this helps,

Tim

timhutton commented 8 years ago

@potholiday To answer your other question: Minecraft has to be running in order for (e.g.) tutorial_1.py to work. You can leave it running but yes, if it is not already running then you need to launch it first with launchClient.sh.

ghost commented 8 years ago

@timhutton Thanks I will try to add ALE or else use the second version :+1:

timhutton commented 8 years ago

Closing this issue since probably fixed.