pirate-audio: mopidy 3.x breaks installation
On December 22, 2019 (6 days ago) mopidy released version 3.0.0 which moves mopidy from python2 to python3. This move breaks the installer since it is designed for python2. Trying to move all mopidy dependencies to python3 is not currently possible due to a lack of python3 support for the Mopidy-PiDi and mopidy-raspberry-gpio python packages. The only way I could get this project/installer to work was to modify the installer to force the latest 2.x version of mopidy:
apt install -y --allow-downgrades mopidy=2.3.1-1 mopidy-spotify
apt-mark hold mopidy
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 64 (29 by maintainers)
Commits related to this issue
- Install from hosted deb files for #9 — committed to pimoroni/pirate-audio by Gadgetoid 4 years ago
- Revert "Install from hosted deb files for #9" This reverts commit 7afb5c44a70e2bc6f4ed1f3f622531d568f18fb3. — committed to pimoroni/pirate-audio by Gadgetoid 4 years ago
@Gadgetoid @docmollo here is the PR I promised and Happy New Year! https://github.com/pimoroni/pirate-audio/pull/10
Groan. I’m not used t going to this kind of extent to side-load packages. I think this whole trick just became redundant though: https://github.com/jaedb/Iris/releases/tag/3.44.0
@rCarto Sorry for the delay…I didn’t have my Pirate Radio setup to test the work we did over the weekend, so I had to do that first. Good thing, too - it turns out the Spotify plugin, which the install.sh script installs for you, also needs to be pinned to a previous version.
So to get this working today, here are the steps I took this morning to get Spotify working. If you don’t want to use Spotify, you can check out the other Mopidy extensions and set things up to your own liking after step 6 below.
PLEASE NOTE: As of January 3, 2020 11:58 AM PST, the fix has been merged and steps 4 and 5 below are NO LONGER REQUIRED. If you performed step 1 prior to this date and time, please delete, and re-clone the repository.
git clone https://github.com/pimoroni/pirate-audio
cd pirate-audio/mopidy
sudo ./install.sh
(this took a while on my Pi Zero…be patient)/etc/mopidy/mopidy.conf
and put your Spotify username and password in the section at the bottom of the fileAfter the Pi boots, the LCD should have the UI up on it with a web URL to visit to control Mopidy. The URL takes you to the main Mopidy interface on the Pi, so to get the Spotify controls, click the Iris web client link on the page.
Migrating our Mopidy packages to Python 3/Mopidy 3.0.0 is on my TODO list.
Mopidy Raspberry GPIO at least has a pending PR: https://github.com/pimoroni/mopidy-raspberry-gpio/pull/3
Sorry I wasn’t that clear, python3-pil is/will be a dependency for the Python 3 compatible version of mopidy-pidi, nothing to do with Mopidy itself.
I’m up and running with the Mopidy 3 versions, everything seems to work great. The only install issue I hit was the following exception
Which was solved by installing
libopenjp2-7
from APT. I don’t understand why that dependency isn’t handled by python3-pil (or what the difference is between pil and pillow).If you could bung them to me that’d be ace! I’ll get 'em hosted ASAP.
@Gadgetoid here is the list of mopidy repo packages I have on my working installation:
I was able to fish those 4 debs out of /var/cache/apt/archives, let me know how you’d like me to deliver them. Also @Gadgetoid @docmollo @jodal, let me know if I’m missing any packages.
It sounds like Iris is very nearly ready for a Python 3 release. That being said, the other two existing Python 3 compatible webclients do certainly support selecting music. But I do admit that musicbox-webclient isn’t half as slick as Iris and clearly a lot of love went into that project.
With that mind, can we help anywhere with porting the Pirate Audio extensions? Is there a work in progress branch to continue from? Is there any questions or specific issues we can help with? I take it you’re happy to workaround that config inline comment regression.
I believe this new error is caused the combination of the Pirate Audio scripts/instructions installing specific versions from APT, which isn’t a normal thing to do from APT, and that the Mopidy project just changed our APT repo setup from using a primitive repo builder called
apt-ftparchive
, that never cleans out old versions, to a more advanced repo builder calledreprepro
, which automatically removes all but the latest version from each distribution. After this change, the only version of Mopidy available from thebuster
distribution on apt.mopidy.com is the latest, 3.0.1-2, which requires Python 3.I think the best way forward for Pirate Audio is to either upgrade to Python 3 and Mopidy 3 (obviously the best approach IMHO), or to use the versions of Mopidy shipped with Debian/Raspbian. The apt.mopidy.com repo is intended for people that want to be more on the bleeding edge than the Debian distributions usually are. Currently, Pirate Audio is not up to date enough to work with the bleeding edge, and should thus stay with the Debian versions.
Yes, I’ve finally created a new issue for it. Sorry for the delay in doing so.
@kingosticks thx for the hint to delete the file mopidy.list. That brought me one step further. But still the script did not finish successfully. I followed then the advice of @docmollo to start from scratch. Before the installation attempt I extended the partition to use the whole SD card. After that the installation script worked well. Due to the experience of the last days I consider that script as very FRAGILE. A easy way to improve the installation would be to declare minimum space requirements.
Very sorry, I was in la-la land and wrote a complete load of garbage earlier. What I should have said is since you are not finding mopidy-spotify at all (it’s not available in Debian’s repo), that sounds exactly like you do not have
apt.mopidy.com
added to your package sources. Which is confirmed since themopidy.list
file in question is zero bytes long.To be totally clear, @Rocketansky, the version in the script is correct. You should remove
/etc/apt/sources.list.d/mopidy.list
and rerun the script.Thanks a lot docmollo!!
Thank you for weighing in on this @docmollo - it’s very appreciated!
I will be able to give the Python 3 ports the attention they deserve when I’m back in the office- alas our Pirate Audio launch came at a somewhat awkward time!
Thank you very much @docmollo !