Mopidy does not find extensions from apt-get

Hello everybody,

yesterday i installed mopidy on my raspbian system with apt-get. After that i installed the soundcloud and the spotify extension with apt-get. After that i added them to my config with
[soundcloud] and [spotify], but they didn’t show up while starting the server and mopidy config didn’t even list the extensions. I couldn’t find a solution for my problem. But after installing the extensions with pip everything worked fine.
Any ideas why the extensions from apt-get couldn’t be found from mopidy? Is there a way to check if they were installed correctly with apt-get?

Thanks for your help and a happy new year :wink:

I’m guessing that you have an old version of Mopidy installed from pip, which doesn’t know how to find the apt-installed extensions.

If my theory is correct, which mopidy will return /usr/local/bin/mopidy. If it returns /usr/bin/mopidy, all is OK.

To fix this, simply run sudo pip uninstall mopidy to remove the pip-installed version of Mopidy. You’ll of course need to do the same with the extensions you installed from pip to use everything from APT.

In general, APT-installed Mopidy will find both APT- and pip-installed extensions, while pip-installed Mopidy will only find pip-installed extensions.

After the sudo pip uninstall mopidy you may also need to sudo rm /usr/local/bin/mopidy. I found it was still there and getting in the way when I tried to do this on one of my older systems the other day.

which mopidy returns ‘/usr/local/bin/mopidy’, but I installed it with sudo apt-get install mopidy and ‘mopidy --version’ returns 0.19.5. apt-get tells me that my version is up to date. cat /etc/apt/sources.list.d/mopidy.list returns

# Mopidy APT archive deb stable main contrib non-free deb-src stable main contrib non-free

I installed my mopidy version with apt-get and the mirrorlist seems to be correct. Any ideas why mopidys path is incorrect?

If you tried installing an extension with pip before apt-get install mopidy, then pip would have installed Mopidy from pip too, as all extensions depends on Mopidy, and the APT package wouldn’t be there to satisfy the dependency yet.

Could that explain it?

You are right. a pip freezetells me that mopidy is installed with pip as well. so i guess i have mopidy and the plugins installed twice. With pip and with apt-get. so i ll try to uninstall the apt-get version. but why does which mopidy show me the path of an “older” version of mopidy?

What command is used (and what which returns) depends on the order of lookup paths in your PATH environment variable. To see the current value of PATH, you can run:

echo $PATH

Typically, /usr/local/... is listed before /usr/..., and thus executables installed by pip in /usr/local/bin gets precedence over executables installed by APT in /usr/bin.

This issue and the workaround is now documented in the official docs:

Hopefully this will become less of a problem with time. Unpinning.