Mopidy Gmusic install

I’m having problems install the gmusic extension for Mopidy. Here’s what I try:

pi@raspberrypi ~ $ pip --version
pip 1.1 from /usr/lib/python2.7/dist-packages (python 2.7)
pi@raspberrypi ~ $ sudo pip install mopidy-gmusic
Collecting mopidy-gmusic
  Using cached Mopidy_GMusic-1.0.0-py2.py3-none-any.whl
Collecting requests>=2.0 (from mopidy-gmusic)
  Using cached requests-2.8.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3/dist-packages (from mopidy-gmusic)
Collecting Pykka>=1.1 (from mopidy-gmusic)
  Using cached Pykka-1.2.1-py2.py3-none-any.whl
Collecting Mopidy>=1.0 (from mopidy-gmusic)
  Using cached Mopidy-1.1.1-py2.py3-none-any.whl
Collecting gmusicapi>=6.0 (from mopidy-gmusic)
  Using cached gmusicapi-7.0.0.tar.gz
Collecting tornado>=2.3 (from Mopidy>=1.0->mopidy-gmusic)
  Using cached tornado-4.3.tar.gz
Collecting validictory!=0.9.2,>=0.8.0 (from gmusicapi>=6.0->mopidy-gmusic)
  Using cached validictory-1.0.1-py2.py3-none-any.whl
Collecting decorator>=3.3.1 (from gmusicapi>=6.0->mopidy-gmusic)
  Using cached decorator-4.0.4-py2.py3-none-any.whl
Collecting mutagen>=1.18 (from gmusicapi>=6.0->mopidy-gmusic)
  Using cached mutagen-1.31.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-0mhjjl/mutagen/setup.py", line 222, in <module>
        from mutagen import version_string
      File "mutagen/__init__.py", line 23, in <module>
        from mutagen._util import MutagenError
      File "mutagen/_util.py", line 452
        if c == u"\x00":
                      ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0mhjjl/mutagen

Is this the right version of pip? I’m using a Raspberry Pi 2 with Raspbian Wheezy installed.

First of all, you should really be using Raspbian Jessie, not Wheezy. Jessie was released in April, so security support for Wheezy will end the upcoming April. Also, the software in Wheezy at least 3.5 years old at this point in time, as Wheezy development was frozen in June 2012.

My theory of what happens here is that the pip you get when running sudo pip is actually using Python 3. You can check by running sudo pip --version and look at the parens at the end of the line you get there.

If that is right, since you’re running Wheezy, your Python 3 is 3.2.3, while Python 3 only got support for the u'some string' syntax in 3.3. Also worth noting is that currently Mopidy only works with Python 2.

I believe this will help you, as it makes sure to run Pip with Python 2.7:

sudo python2.7 -m pip install mopidy-gmusic