can't run development version on raspberry pi

Avatar

By Asmanel 12 Sep 2018 04:59

New member · 3 comments

I first installed Tuxemon on my raspberry pi the two ways described on this page. Globally, both worked fine, even if the data were clearly outdated.

To play a more recent version, I downloaded the development version, following the instructions for debian (I use Raspbian). This didn't work. I tried many things, without success, the game remained impossible to start.

Avatar

By bitcraft 12 Sep 2018 13:24

Champion · 165 comments

Could you post a traceback, or a specific error message about why it didn't start?

Avatar

By Asmanel 14 Sep 2018 23:45

New member · 3 comments

I saw, before starting this thread, I saw pip ended on an error. So, I ran it again pip before restart the game

Here is what I got :

pi@raspberrypi:~/Documents/git_proj/Tuxemon $ sudo pip install -U -r requirements.txt
Collecting cbor (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/9b/99/01c6a987c920500189eb74a291bd3a388e6c7cf85736bb6b066d9833315e/cbor-1.0.0.tar.gz
Requirement already up-to-date: pytmx>=3.20.17 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting pyscroll>=2.19.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/46/76/f902890f21256a9cbd81d9afc165604c6ffff829fafef532879b6e5b84e0/pyscroll-2.19.1.tar.gz
Collecting pillow (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Collecting pygame>=1.9.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    
    
    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...
    
    sh: 1: sdl-config: not found
    sh: 1: sdl-config: not found
    sh: 1: sdl-config: not found
    
    Hunting dependencies...
    WARNING: "sdl-config" failed!
    WARNING: "pkg-config freetype2" failed!
    Unable to run "sdl-config". Please make sure a development version of SDL is installed.
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OafqaJ/pygame/
pi@raspberrypi:~/Documents/git_proj/Tuxemon $ python tuxemon.py
Traceback (most recent call last):
  File "tuxemon.py", line 42, in <module>
    import tuxemon.core.main
  File "/home/pi/Documents/git_proj/Tuxemon/tuxemon/core/main.py", line 35, in <module>
    from .components.player import Player
  File "/home/pi/Documents/git_proj/Tuxemon/tuxemon/core/components/player.py", line 34, in <module>
    from tuxemon.core.components.npc import Npc
  File "/home/pi/Documents/git_proj/Tuxemon/tuxemon/core/components/npc.py", line 39, in <module>
    from tuxemon.core.components.entity import Entity
  File "/home/pi/Documents/git_proj/Tuxemon/tuxemon/core/components/entity.py", line 27, in <module>
    from tuxemon.core.components.map import proj
  File "/home/pi/Documents/git_proj/Tuxemon/tuxemon/core/components/map.py", line 37, in <module>
    import pyscroll
ImportError: No module named pyscroll
pi@raspberrypi:~/Documents/git_proj/Tuxemon $

Once this output copied and pasted here, I saw I misread the pip ouput. It's true I first focused on the last line, that was printed in dark red, while all of the remain was printed in white.

Visibly, at least two dependencies, including SDL, are missing but I don't know how i'm supposed to install them (via apt-get, via pip or some other way).

Avatar

By bitcraft 15 Sep 2018 01:34

Champion · 165 comments

Those directions are out of date.  Please follow the instructions on the github for Debian.  https://github.com/Tuxemon/Tuxemon

Avatar

By Asmanel 17 Sep 2018 03:49

New member · 3 comments

It's exactly what I did first.

The problem was an unexpected error : pip ended running on an error.

At seeing it, I first guessed the game was dirtily programmed and, so, it was normal.

After I tried to launch the game, that didn't start, I understood this wasn't normal.

So, I tried several things (on a copy of the game folder to avoid some problems) without success.

Yesterday, I installed the missing libraries, via the packages manager and I ran again pip several times to check if all of the missing libraries were installed.

pi@raspberrypi:~/Documents/git_proj/Tuxemon $ sudo pip install -U -r requirements.txt
Collecting cbor (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/9b/99/01c6a987c920500189eb74a291bd3a388e6c7cf85736bb6b066d9833315e/cbor-1.0.0.tar.gz
Requirement already up-to-date: pytmx>=3.20.17 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting pyscroll>=2.19.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/46/76/f902890f21256a9cbd81d9afc165604c6ffff829fafef532879b6e5b84e0/pyscroll-2.19.1.tar.gz
Collecting pillow (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Collecting pygame>=1.9.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    
    
    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...
    
    
    Hunting dependencies...
    WARNING: "pkg-config freetype2" failed!
    SDL     : found 1.2.15
    FONT    : not found
    IMAGE   : not found
    MIXER   : not found
    PNG     : found
    JPEG    : not found
    SCRAP   : found
    PORTMIDI: not found
    PORTTIME: not found
    FREETYPE: found 2.6.3
    Missing dependencies
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-w4WrqM/pygame/
pi@raspberrypi:~/Documents/git_proj/Tuxemon $ sudo pip install -U -r requirements.txt
Collecting cbor (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/9b/99/01c6a987c920500189eb74a291bd3a388e6c7cf85736bb6b066d9833315e/cbor-1.0.0.tar.gz
Requirement already up-to-date: pytmx>=3.20.17 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting pyscroll>=2.19.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/46/76/f902890f21256a9cbd81d9afc165604c6ffff829fafef532879b6e5b84e0/pyscroll-2.19.1.tar.gz
Collecting pillow (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Collecting pygame>=1.9.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    
    
    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...
    
    
    Hunting dependencies...
    WARNING: "pkg-config freetype2" failed!
    SDL     : found 1.2.15
    FONT    : not found
    IMAGE   : not found
    MIXER   : not found
    PNG     : found
    JPEG    : not found
    SCRAP   : found
    PORTMIDI: not found
    PORTTIME: not found
    FREETYPE: found 2.6.3
    Missing dependencies
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-IlBA3E/pygame/
pi@raspberrypi:~/Documents/git_proj/Tuxemon $ sudo pip install -U -r requirements.txt
Collecting cbor (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/9b/99/01c6a987c920500189eb74a291bd3a388e6c7cf85736bb6b066d9833315e/cbor-1.0.0.tar.gz
Requirement already up-to-date: pytmx>=3.20.17 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting pyscroll>=2.19.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/46/76/f902890f21256a9cbd81d9afc165604c6ffff829fafef532879b6e5b84e0/pyscroll-2.19.1.tar.gz
Collecting pillow (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Collecting pygame>=1.9.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz
    Complete output from command python setup.py egg_info:
    
    
    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...
    
    
    Hunting dependencies...
    WARNING: "pkg-config freetype2" failed!
    SDL     : found 1.2.15
    FONT    : not found
    IMAGE   : found
    MIXER   : found
    PNG     : found
    JPEG    : found
    SCRAP   : found
    PORTMIDI: not found
    PORTTIME: not found
    FREETYPE: found 2.6.3
    Missing dependencies
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-TNFUVh/pygame/
pi@raspberrypi:~/Documents/git_proj/Tuxemon $ sudo pip install -U -r requirements.txt
Collecting cbor (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/9b/99/01c6a987c920500189eb74a291bd3a388e6c7cf85736bb6b066d9833315e/cbor-1.0.0.tar.gz
Requirement already up-to-date: pytmx>=3.20.17 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting pyscroll>=2.19.1 (from -r requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/46/76/f902890f21256a9cbd81d9afc165604c6ffff829fafef532879b6e5b84e0/pyscroll-2.19.1.tar.gz
Collecting pillow (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/d3/c4/b45b9c0d549f482dd072055e2d3ced88f3b977f7b87c7a990228b20e7da1/Pillow-5.2.0.tar.gz
Collecting pygame>=1.9.4 (from -r requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz
Collecting six (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Requirement already up-to-date: neteria in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 7))
Requirement already up-to-date: rsa in /usr/local/lib/python2.7/dist-packages (from neteria->-r requirements.txt (line 7))
Collecting pyasn1>=0.1.3 (from rsa->neteria->-r requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl (72kB)
    100% |████████████████████████████████| 81kB 1.1MB/s 
Building wheels for collected packages: cbor, pyscroll, pillow, pygame
  Running setup.py bdist_wheel for cbor ... done
  Stored in directory: /root/.cache/pip/wheels/40/5c/a5/e6d629446a6a687ba328c55f1589234c29b99ef35b1a65dbaa
  Running setup.py bdist_wheel for pyscroll ... done
  Stored in directory: /root/.cache/pip/wheels/de/73/5d/5909691edf3ec563cd360608be47f6b4a79de497f2c16da6e1
  Running setup.py bdist_wheel for pillow ... done
  Stored in directory: /root/.cache/pip/wheels/f7/05/ba/7944a8324e58b7566fb309418c0002e582e4eb385ee94e068c
  Running setup.py bdist_wheel for pygame ... done
  Stored in directory: /root/.cache/pip/wheels/ad/66/35/b628ce205dcf5230a32578d992ac0469897a36ead89dcb1d53
Successfully built cbor pyscroll pillow pygame
Installing collected packages: cbor, pygame, pyscroll, pillow, six, pyasn1
  Found existing installation: pygame 1.9.3
    Not uninstalling pygame at /usr/lib/python2.7/dist-packages, outside environment /usr
  Found existing installation: Pillow 4.0.0
    Not uninstalling pillow at /usr/lib/python2.7/dist-packages, outside environment /usr
  Found existing installation: six 1.10.0
    Not uninstalling six at /usr/lib/python2.7/dist-packages, outside environment /usr
  Found existing installation: pyasn1 0.1.9
    Not uninstalling pyasn1 at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed cbor-1.0.0 pillow-5.2.0 pyasn1-0.4.4 pygame-1.9.4 pyscroll-2.19.1 six-1.11.0

It wasn't easy but, now, the game works.

Avatar

By bitcraft 17 Sep 2018 13:09

Champion · 165 comments

Good to hear!  The good news is, now it shouldn't be so difficult in the future.  It looks like pygame has issues building on raspberry pi.  I haven't seen that issue on other platforms.

Last edited by bitcraft (17 Sep 2018 13:12)