I attempted to update mopidy this afternoon on my raspberry pi running Raspbian GNU/Linux 8 (jessie). Now when I attempt to start mopidy I get error messages referencing /user/lib/python2.7/dist-packages/pkg_resource.py and several other similar messages. Unfortunately I am fairly new to unix, the raspberry pi, and installing packages using apt-get. I have been through several sets of instructions to install mopidy and configure it. It was working before my attempt to update before.
As I research issues it looks like one common problem is either the version/type of package installed or multiple copies installed. I don’t think I have a type of package issue since I’m on jessie. How do I tell if multiple copies or sources are installed?
Here is the complete error message:
pi@raspberrypi:~ $ mopidy
Traceback (most recent call last):
File "/usr/local/bin/mopidy", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2876, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 451, in _build_master
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 464, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 639, in resolve
/usr/local/bin/mopidy is pip-installed. I can tell that from it beeing in
/usr/local/bin and not
/usr/bin like apt-installed packages.
Thus, the first thing I’d try is to remove the pip-installed Mopidy:
sudo pip uninstall mopidy
Then, you can check that
/usr/bin/mopidy by running:
$ which mopidy
In general, I recommend using apt-installed Mopidy from apt.mopidy.com as you’ll then get updates automatically and non-Python dependencies are installed automatically.
Thank you very much! That was an easy fix!