What am I missing here? All relevant packages (appear to be) installed. Cannot even get mopidy --version to run without this error. Defaults in the ~/.config/mopidy/mopidy.conf file. Disabled httpd and got same.
Ubuntu 14.xx 32 bit on a craptastic dual core.
[12:41 wes@MediaCenter ~] > mopidy
Traceback (most recent call last):
File "/usr/bin/mopidy", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: backports.ssl-match-hostname
Both installation from pip and from apt-get should install backports.ssl-match-hostname by default. It’s one of Tornado’s dependencies, thus a transitive dependency of Mopidy.
I cannot run any switches for mopidy at all, deps, --help, --version, --letsforceanerror
All lead right back to the exact same message.
The error context seems to point to a missing or incorrect version of some dependency, but nothing was prompted in the install and the ubuntu-dev-tools and python-testtools are installed.
Installing collected packages: certifi
Running setup.py install for certifi
Successfully installed certifi
Cleaning up…
and then
[13:30 wes@MediaCenter ~] > mopidy
INFO Starting Mopidy 0.19.4
INFO Loading config from: builtin defaults, /etc/xdg/mopidy/mopidy.conf, /home/wes/.config/mopidy/mopidy.conf, command line options
INFO Enabled extensions: spotify, mpd, softwaremixer, local, stream
INFO Disabled extensions: http
INFO Starting Mopidy mixer: SoftwareMixer
INFO Mixing using GStreamer software mixing
INFO Starting Mopidy audio
INFO Starting Mopidy backends: LocalBackend, StreamBackend, SpotifyBackend
INFO Loaded 0 local playlists from /home/wes/.local/share/mopidy/local/playlists
INFO No local library metadata cache found at /home/wes/.local/share/mopidy/local/library.json.gz. Please run mopidy local scan to index your local music library. If you do not have a local music collection, you can disable the local backend to hide this message.
INFO Loaded 0 local tracks using json
INFO Audio output set to “autoaudiosink”
INFO Mopidy uses SPOTIFY(R) CORE
INFO Starting Mopidy core
INFO Starting Mopidy frontends: MpdFrontend
INFO MPD server running at [::ffff:127.0.0.1]:6600
ERROR Spotify login error: Needs a premium account
INFO Disconnected from Spotify
Premium account?! womp womp womp…
So bottom line some things are not being picket up by apt-get, but I can go get them with pip and get it running. Hopefully the output here will help anyone else encountering this and get it corrected in the package (assuming the problem is not on my end, but not sure how…)
I’m curious what combination of apt- and pip-installed dependencies you’ve ended up with. Everything should work with just sudo apt-get install mopidy on Ubuntu 14.04.
The explanation here can probably be read in the paths the packages are imported from. pip on Ubuntu installs dependencies into /usr/local/lib/python2.7. apt-get install Python libraries into /usr/lib/python2.7 and Python applications into /usr/share/{application}.
To me, it looks like you had Tornado 4.0.1 installed from pip before installing Mopidy, but was missing its dependencies certifi and backports.ssl-match-hostname.
Ubuntu 14.04 comes with Tornado 3.1.1, which does not depend on certifi and backports.ssl-match-hostname. Those where new dependencies in Tornado 4.0. The mopidy package depends on the python-tornado package from Ubuntu.
To confirm that the problem here is your existing uncomplete installation of Tornado, can you try to uninstall your global pip-install of Tornado so that Python will find Tornado from apt instead? /usr/lib/python2.7 is later on your PYTHONPATH than /usr/local/lib/python2.7, so pip shadows apt.
To confirm that you already have Tornado 3.1.1 installed from apt, since it’s one of the mopidy package’s dependencies:
dpkg -l | grep python-tornado
To uninstall your global Tornado install with friends: