Mopidy installed from both apt and pip causing issues

I write this in the hope that it might be useful for anybody who experiences this error.
Took me a couple of hours to figure it out.
It turned out that i had two mopidy executables on my ubuntu system. This obviously resulted from pip installing in /usr/local/bin and apt-get installed in /usr/bin. Also ubuntu decided to change the ownership of my ~/.config/mopidy/mopidy.conf to root.
Also ubuntu wants to run the mopidy damon under a user mopidy and expects its config files under /etc/mopidy and /etc/mopidy/extensions.d.
While this all makes sense, it conflicts with the setup under /usr/local/bin which (at least on my system) gets called before /usr/bin.
I am pretty sure i already deleted /usr/local/bin/mopidy once, but pip install seems to have recreated it.
So either let ubuntu start the daemon and put your config in /etc/mopidy or start from the commandline with full /usr/bin/mopidy path.

HTH

I believe this will be fixed in the next release but thanks for taking the time to post here.

Not sure what the subject has to do with the rest of your post, but…

The Mopidy Debian package or Ubuntu should under no circumstances change the ownership of ~/.config/mopidy/mopidy.conf. If you can reproduce that, please file a bug against Mopidy.

The Debian package of Mopidy, as of version 0.19.4-2 (available from apt.mopidy.com and in Debian, but not in Ubuntu until after the 14.10 release) has moved the installation of the mopidy Python package, so that pip install Mopidy-Some-Extension will find Mopidy and not install a second copy with an executable at /usr/local/bin/mopidy.

If you’re running Mopidy from Debian package 0.19.4-2 or newer (check with dpkg -l mopidy), you should be able to uninstall the pip-installed Mopidy with sudo pip uninstall mopidy, and it should not any more be reinstalled when you pip-install a new extension.

Actually /etc/mopidy/mopidy.conf was a sym link to my ~/config/mopidy/mopidy.conf.
Probably this link was created by me some time ago and i forgot about it. So i guess the Ubuntu Package just touched /etc/mopidy/mopidy.conf and thereby changing the permission of the link target.
My bad, i guess. Droped the link now and let ubuntu have its way.

I am running Mopidy 0.19.4-2 on Ubuntu
/usr/bin/mopidy: is a symbolic link to `…/share/mopidy/mopidy-cmd’

sudo pip uninstall mopidy

gives:

Uninstalling Mopidy:
  /usr/lib/python2.7/dist-packages/Mopidy-0.19.4.egg-info
  /usr/lib/python2.7/dist-packages/mopidy
  /usr/share/mopidy/mopidy-cmd

removing the file /usr/bin/mopidy is linked to. No so good.
/usr/local/bin/mopidy OTOH is a python script:

#!/usr/bin/python

# -*- coding: utf-8 -*-
import re
import sys

from mopidy.__main__ import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

This scripts returns the right version but when started produces the error in the headline.
As far as i am concerned this is not an issue since the daemon running under user mopidy has the correct PATH settings.

On a slightly related note: if there is no sound for user mopidy, it might be an alsasink device definition that relies on a ~/.asoundrc not present for user mopidy. At least that one did not take me quite that long to figure.

All of these files are “owned” by the Debian package and should not be touched by pip.

My guess: You’ve already removed the pip-installed Mopidy, and just have the /usr/local/bin/mopidy file left causing issues.

ok will delete /usr/local/bin/mopidy then and see what happens.