# Having trouble running Mopidy on Raspbian Jessie

**URL:** https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365
**Category:** Misc
**Created:** [October 5, 2016, 11:10am UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365 "2016-10-05T11:10:21Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mattomatto](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mattomatto](https://discourse.mopidy.com/u/mattomatto)
#### Post date: [October 5, 2016, 11:10am UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/1 "2016-10-05T11:10:22Z")

</div>

Hi there,

I have installed mopidy for Jessie as instructed on the website. Install gave no errors. On running mopidy I get the following error. Any ideas on where to start?

> pi@raspberrypi:~ $ mopidy  
> Traceback (most recent call last):  
> File “/usr/bin/mopidy”, line 9, in   
> load\_entry\_point(‘Mopidy==2.0.1’, ‘console\_scripts’, ‘mopidy’)()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 356, in load\_entry\_point  
> return get\_distribution(dist).load\_entry\_point(group, name)  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2476, in load\_entry\_point  
> return ep.load()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2190, in load  
> [‘ **name** ’])  
> File “/usr/lib/python2.7/dist-packages/mopidy/ **main**.py”, line 8, in   
> from mopidy.internal.gi import Gst # noqa: F401  
> File “/usr/lib/python2.7/dist-packages/mopidy/internal/gi.py”, line 9, in   
> gi.require\_version(‘Gst’, ‘1.0’)  
> AttributeError: ‘module’ object has no attribute ‘require\_version’

Any help greatly appreciated 🙂

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [October 5, 2016, 2:24pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/2 "2016-10-05T14:24:30Z")

</div>

Please provide the output of `mopidy deps` .

---

<div class="post-metadata">

### Author: ![mattomatto](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mattomatto](https://discourse.mopidy.com/u/mattomatto)
#### Post date: [October 5, 2016, 2:37pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/3 "2016-10-05T14:37:26Z")

</div>

Modpidy deps gives me the same error:

> mopidy deps  
> Traceback (most recent call last):  
> File “/usr/bin/mopidy”, line 9, in   
> load\_entry\_point(‘Mopidy==2.0.1’, ‘console\_scripts’, ‘mopidy’)()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 356, in load\_entry\_point  
> return get\_distribution(dist).load\_entry\_point(group, name)  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2476, in load\_entry\_point  
> return ep.load()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2190, in load  
> [‘ **name** ’])  
> File “/usr/lib/python2.7/dist-packages/mopidy/ **main**.py”, line 8, in   
> from mopidy.internal.gi import Gst # noqa: F401  
> File “/usr/lib/python2.7/dist-packages/mopidy/internal/gi.py”, line 9, in   
> gi.require\_version(‘Gst’, ‘1.0’)  
> AttributeError: ‘module’ object has no attribute ‘require\_version’

I’ve tried reinstalling pip and python, for the same result.

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [October 5, 2016, 4:44pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/4 "2016-10-05T16:44:15Z")

</div>

I literally just did this on the very latest (September) Raspbian image. Exactly which instructions did you follow, [https://docs.mopidy.com/en/latest/installation/debian/](https://docs.mopidy.com/en/latest/installation/debian/) ? Could you paste the output of:

- `ls -l /usr/lib/python2.7/dist-packages/gi`.
- `cat /etc/apt/sources.list.d/mopidy.list`

---

<div class="post-metadata">

### Author: ![mattomatto](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mattomatto](https://discourse.mopidy.com/u/mattomatto)
#### Post date: [October 6, 2016, 10:10am UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/5 "2016-10-06T10:10:58Z")

</div>

Yes, those were the instructions I used.

Here’s what I get for those commands:

```auto
 pi@raspberrypi:~ $ ls -l /usr/lib/python2.7/dist-packages/gi
 total 464
 -rw-r--r-- 1 root root 2078 Sep 29 2014 _constants.py
 -rw-r--r-- 1 root root 1310 May 10 23:32 _constants.pyc
 -rw-r--r-- 1 root root 6688 Sep 29 2014 docstring.py
 -rw-r--r-- 1 root root 4953 May 10 23:32 docstring.pyc
 -rw-r--r-- 1 root root 2080 Sep 29 2014 _error.py
 -rw-r--r-- 1 root root 1782 May 10 23:32 _error.pyc
 -rw-r--r-- 1 root root 251484 Sep 29 2014 _gi.so
 drwxr-xr-x 2 root root 4096 Jan 1 1970 _gobject
 -rw-r--r-- 1 root root 2163 Sep 29 2014 importer.py
 -rw-r--r-- 1 root root 1641 May 10 23:32 importer.pyc
 -rw-r--r-- 1 root root 4550 Sep 29 2014 __init__.py
 -rw-r--r-- 1 root root 3970 May 10 23:32 __init__.pyc
 -rw-r--r-- 1 root root 12784 Sep 29 2014 module.py
 -rw-r--r-- 1 root root 9122 May 10 23:32 module.pyc
 -rw-r--r-- 1 root root 13249 Sep 29 2014 _option.py
 -rw-r--r-- 1 root root 12710 May 10 23:32 _option.pyc
 drwxr-xr-x 2 root root 4096 Oct 5 11:15 overrides
 -rw-r--r-- 1 root root 15175 Sep 29 2014 _propertyhelper.py
 -rw-r--r-- 1 root root 12859 May 10 23:32 _propertyhelper.pyc
 -rw-r--r-- 1 root root 766 Sep 29 2014 pygtkcompat.py
 -rw-r--r-- 1 root root 752 May 10 23:32 pygtkcompat.pyc
 drwxr-xr-x 2 root root 4096 Jan 1 1970 repository
 -rw-r--r-- 1 root root 9776 Sep 29 2014 _signalhelper.py
 -rw-r--r-- 1 root root 9676 May 10 23:32 _signalhelper.pyc
 -rw-r--r-- 1 root root 13565 Sep 29 2014 types.py
 -rw-r--r-- 1 root root 9536 May 10 23:32 types.pyc
 pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/mopidy.list
 # Mopidy APT archive
 # Built on Debian 8 (jessie), compatible with Ubuntu 14.04 LTS and 15.04
 deb http://apt.mopidy.com/ jessie main contrib non-free
 deb-src http://apt.mopidy.com/ jessie main contrib non-free

```

Thanks

---

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [October 6, 2016, 1:25pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/6 "2016-10-06T13:25:36Z")

</div>

Could you try reinstalling python-gi? `sudo apt-get install python-gi --reinstall`

---

<div class="post-metadata">

### Author: ![mattomatto](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mattomatto](https://discourse.mopidy.com/u/mattomatto)
#### Post date: [October 6, 2016, 3:10pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/7 "2016-10-06T15:10:18Z")

</div>

I’ve reinstalled python gi and mopidy gives the same error:

> pi@raspberrypi:~ $ sudo apt-get install python-gi --reinstall  
> Reading package lists… Done  
> Building dependency tree  
> Reading state information… Done  
> The following packages were automatically installed and are no longer required:  
> python-colorama python-distlib python-html5lib python-wheel  
> Use ‘apt-get autoremove’ to remove them.  
> 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 6 not upgraded.  
> Need to get 475 kB of archives.  
> After this operation, 0 B of additional disk space will be used.  
> Get:1 [Index of /raspbian](http://mirrordirector.raspbian.org/raspbian/) jessie/main python-gi armhf 3.14.0-1 [475 kB]  
> Fetched 475 kB in 1s (333 kB/s)  
> (Reading database … 126350 files and directories currently installed.)  
> Preparing to unpack …/python-gi\_3.14.0-1\_armhf.deb …  
> Unpacking python-gi (3.14.0-1) over (3.14.0-1) …  
> Setting up python-gi (3.14.0-1) …  
> pi@raspberrypi:~ $ mopidy  
> Traceback (most recent call last):  
> File “/usr/bin/mopidy”, line 9, in   
> load\_entry\_point(‘Mopidy==2.0.1’, ‘console\_scripts’, ‘mopidy’)()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 356, in load\_entry\_point  
> return get\_distribution(dist).load\_entry\_point(group, name)  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2476, in load\_entry\_point  
> return ep.load()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2190, in load  
> [‘ **name** ’])  
> File “/usr/lib/python2.7/dist-packages/mopidy/ **main**.py”, line 8, in   
> from mopidy.internal.gi import Gst # noqa: F401  
> File “/usr/lib/python2.7/dist-packages/mopidy/internal/gi.py”, line 9, in   
> gi.require\_version(‘Gst’, ‘1.0’)  
> AttributeError: ‘module’ object has no attribute ‘require\_version’

I then tried reinstalling mopidy, and the same error persists:

> pi@raspberrypi:~ $ sudo apt-get install mopidy --reinstall  
> Reading package lists… Done  
> Building dependency tree  
> Reading state information… Done  
> The following packages were automatically installed and are no longer required:  
> python-colorama python-distlib python-html5lib python-wheel  
> Use ‘apt-get autoremove’ to remove them.  
> 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 6 not upgraded.  
> Need to get 0 B/204 kB of archives.  
> After this operation, 0 B of additional disk space will be used.  
> Preconfiguring packages …  
> (Reading database … 126350 files and directories currently installed.)  
> Preparing to unpack …/mopidy\_2.0.1-1\_all.deb …  
> Unpacking mopidy (2.0.1-1) over (2.0.1-1) …  
> Processing triggers for gnome-menus (3.13.3-6) …  
> Processing triggers for desktop-file-utils (0.22-1) …  
> Processing triggers for mime-support (3.58) …  
> Processing triggers for man-db (2.7.0.2-5) …  
> Processing triggers for systemd (215-17+deb8u5) …  
> Setting up mopidy (2.0.1-1) …  
> insserv: warning: current start runlevel(s) (empty) of script `mopidy' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mopidy’ overrides LSB defaults (0 1 6).  
> insserv: warning: current start runlevel(s) (empty) of script `mopidy' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mopidy’ overrides LSB defaults (0 1 6).  
> pi@raspberrypi:~ $ mopidy  
> Traceback (most recent call last):  
> File “/usr/bin/mopidy”, line 9, in   
> load\_entry\_point(‘Mopidy==2.0.1’, ‘console\_scripts’, ‘mopidy’)()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 356, in load\_entry\_point  
> return get\_distribution(dist).load\_entry\_point(group, name)  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2476, in load\_entry\_point  
> return ep.load()  
> File “/usr/lib/python2.7/dist-packages/pkg\_resources.py”, line 2190, in load  
> [‘ **name** ’])  
> File “/usr/lib/python2.7/dist-packages/mopidy/ **main**.py”, line 8, in   
> from mopidy.internal.gi import Gst # noqa: F401  
> File “/usr/lib/python2.7/dist-packages/mopidy/internal/gi.py”, line 9, in   
> gi.require\_version(‘Gst’, ‘1.0’)  
> AttributeError: ‘module’ object has no attribute ‘require\_version’  
> pi@raspberrypi:~ $

---

<div class="post-metadata">

### Author: ![mattomatto](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@mattomatto](https://discourse.mopidy.com/u/mattomatto)
#### Post date: [October 6, 2016, 4:30pm UTC](https://discourse.mopidy.com/t/having-trouble-running-mopidy-on-raspbian-jessie/1365/8 "2016-10-06T16:30:50Z")

</div>

Tried again with a fresh install of Jessie, and it worked first time.  
Must have had some corrupt python files.

Thanks for your help anyway.
