I’ve spent all evening scratching my head over this and I’ve found a way to get it working. There are two problems with the instructions as of recently.
- Homebrew now defaults to python3, which does not work with Mopidy. Installing anything that depends on ‘python’ will pull in python3, which then breaks everything.
- Mopidy’s Homebrew formula for libspotify no longer works, as the binary download is no longer available on spotify’s developer site.
To fix this, I had to install all the binary dependencies from Homebrew, force Homebrew to use python2.7, and make sure I installed all the python stuff using pip. So, ignore all the instructions on the mopidy site and do this instead.
If you’ve already installed it, remove Homebrew first and make sure you then remove any /usr/local/lib/python* directories that are left behind.
Instructions for removing Homebrew : https://github.com/Homebrew/brew/blob/master/docs/FAQ.md#how-do-i-uninstall-homebrew
Install python 2.7 from Homebrew
brew install python@2
Install Mopidy’s binary dependencies (gstreamer).
brew install gst-plugins-base --with-libogg --with-libvorbis --with-opus --with-theora
brew install gst-plugins-good --with-flac --with-libshout --with-speex --with-taglib
brew install gst-plugins-bad --with-faad2 --with-libmms
brew install gst-plugins-ugly --with-flac --with-lame --with-libmms --with-libvorbis --with-mad --with-libshout --with-theora --with-two-lame
brew install gst-libav
Install gstreamer python bindings, making sure to force it to use python 2.7, otherwise it’ll pull in python3. The order of the options seemed to make a difference, even though it shouldn’t.
brew install pygobject3 --with-python@2 --without-python
brew install gst-python --without-python --with-python@2
Now install mopidy from pip
pip install --upgrade pip
pip install mopidy mopidy-spotify
And you can now run mopidy by typing 'mopidy". It’s working for me now.
To get it to load at login, create a file
with the following content
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
launchctl load ~/Library/LaunchAgents/my.hack.for.mopidy.plist