PetitPrinc3 / PIpod-Nano

A DIY Ipod nano lookalike involving a raspberry pi zero
16 stars 1 forks source link

Install fails if Python version doesn't match #5

Closed sarahniu closed 2 weeks ago

sarahniu commented 7 months ago

`Begining, downloading Pimonori Pirate Audio Software Cloning into 'pirate-audio'... remote: Enumerating objects: 358, done. remote: Counting objects: 100% (72/72), done. remote: Compressing objects: 100% (36/36), done. remote: Total 358 (delta 42), reused 43 (delta 35), pack-reused 286 Receiving objects: 100% (358/358), 139.45 KiB | 443.00 KiB/s, done. Resolving deltas: 100% (160/160), done.

Runing Pirate Audio Installation Updating apt and installing dependencies Hit:1 https://apt.mopidy.com bullseye InRelease Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease Hit:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. Reading package lists... Done Building dependency tree... Done Reading state information... Done libopenjp2-7 is already the newest version (2.4.0-3). python3-numpy is already the newest version (1:1.19.5-1). python3-pil is already the newest version (8.1.2+dfsg-0.3+deb11u1). python3-rpi.gpio is already the newest version (0.7.0-0.2+b1). python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1). python3-spidev is already the newest version (20200602~200721-1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Verifying python 3.x version Found Python 3.9

Backing up mopidy config to: /etc/mopidy/mopidy.conf.backup-2024-01-16-13-27-48

Installing mopidy packages mopidy was already not hold. Reading package lists... Done Building dependency tree... Done Reading state information... Done mopidy is already the newest version (3.4.2-1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Installing Iris web UI for Mopidy Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: mopidy-iris in /usr/local/lib/python3.9/dist-packages (3.69.3) Collecting mopidy-iris Using cached https://www.piwheels.org/simple/mopidy-iris/Mopidy_Iris-3.69.3-py3-none-any.whl (7.0 MB) Using cached https://www.piwheels.org/simple/mopidy-iris/Mopidy_Iris-3.69.2-py3-none-any.whl (7.0 MB) Requirement already satisfied: Pykka>=2.0.1 in /usr/lib/python3/dist-packages (from mopidy-iris) (2.0.3) Requirement already satisfied: Mopidy>=3.0 in /usr/lib/python3/dist-packages (from mopidy-iris) (3.4.2) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from mopidy-iris) (52.0.0)

Adding /usr/local/lib/python3.9/dist-packages/mopidy_iris/system.sh to /etc/sudoers.d/010_mopidy-nopasswd

Installing Pirate Audio plugins... Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: Mopidy-PiDi in /usr/local/lib/python3.9/dist-packages (1.0.4) Collecting Mopidy-PiDi Using cached https://www.piwheels.org/simple/mopidy-pidi/mopidy_pidi-1.0.4-py2.py3-none-any.whl (13 kB) Using cached https://www.piwheels.org/simple/mopidy-pidi/mopidy_pidi-1.0.3-py2.py3-none-any.whl (12 kB) Requirement already satisfied: Mopidy-Local in /usr/local/lib/python3.9/dist-packages (3.2.1) Collecting Mopidy-Local Using cached https://www.piwheels.org/simple/mopidy-local/Mopidy_Local-3.2.1-py3-none-any.whl (30 kB) Using cached https://www.piwheels.org/simple/mopidy-local/Mopidy_Local-3.2.0-py3-none-any.whl (30 kB) Requirement already satisfied: pidi-display-pil in /usr/local/lib/python3.9/dist-packages (0.1.0) Collecting pidi-display-pil Using cached https://www.piwheels.org/simple/pidi-display-pil/pidi_display_pil-0.1.0-py3-none-any.whl (12 kB) Using cached https://www.piwheels.org/simple/pidi-display-pil/pidi_display_pil-0.0.2-py3-none-any.whl (11 kB) Requirement already satisfied: pidi-display-st7789 in /usr/local/lib/python3.9/dist-packages (0.1.2) Collecting pidi-display-st7789 Using cached https://www.piwheels.org/simple/pidi-display-st7789/pidi_display_st7789-0.1.2-py3-none-any.whl (4.0 kB) Using cached https://www.piwheels.org/simple/pidi-display-st7789/pidi_display_st7789-0.1.1-py3-none-any.whl (2.7 kB) Requirement already satisfied: mopidy-raspberry-gpio in /usr/local/lib/python3.9/dist-packages (1.0.4) Collecting mopidy-raspberry-gpio Using cached https://www.piwheels.org/simple/mopidy-raspberry-gpio/mopidy_raspberry_gpio-1.0.4-py3-none-any.whl (10 kB) Using cached https://www.piwheels.org/simple/mopidy-raspberry-gpio/mopidy_raspberry_gpio-1.0.3-py3-none-any.whl (9.7 kB) Requirement already satisfied: Pykka>=2.0.1 in /usr/lib/python3/dist-packages (from Mopidy-Local) (2.0.3) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from Mopidy-Local) (52.0.0) Requirement already satisfied: Mopidy>=3.0.0 in /usr/lib/python3/dist-packages (from Mopidy-Local) (3.4.2) Requirement already satisfied: uritools>=1.0 in /usr/local/lib/python3.9/dist-packages (from Mopidy-Local) (4.0.2) Requirement already satisfied: musicbrainzngs>=0.6 in /usr/local/lib/python3.9/dist-packages (from Mopidy-PiDi) (0.7.1) Requirement already satisfied: netifaces in /usr/local/lib/python3.9/dist-packages (from Mopidy-PiDi) (0.11.0) Requirement already satisfied: font-roboto in /usr/local/lib/python3.9/dist-packages (from pidi-display-pil) (0.0.1) Requirement already satisfied: fonts in /usr/local/lib/python3.9/dist-packages (from pidi-display-pil) (0.0.3) Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (from pidi-display-pil) (8.1.2) Requirement already satisfied: st7789 in /usr/local/lib/python3.9/dist-packages (from pidi-display-st7789) (0.0.4)

Resetting /etc/mopidy/mopidy.conf to package defaults. Any custom settings have been backed up to /etc/mopidy/mopidy.conf.backup-2024-01-16-13-27-48

Configuring Mopidy

Enabling and starting Mopidy Synchronizing state of mopidy.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable mopidy

All done! Mopidy configuration has changed, see summary below and make sure to update /etc/mopidy/mopidy.conf! Your previous configuration was backed up to /etc/mopidy/mopidy.conf.backup-2024-01-16-13-27-48 103,150d102 < < [raspberry-gpio] < enabled = true < bcm5 = play_pause,active_low,250 < bcm6 = volume_down,active_low,250 < bcm16 = next,active_low,250 < bcm20 = volume_up,active_low,250 < bcm24 = volume_up,active_low,250 < < [file] < enabled = true < media_dirs = /home/pi/Music < show_dotfiles = false < excluded_file_extensions = < .directory < .html < .jpeg < .jpg < .log < .nfo < .pdf < .png < .txt < .zip < follow_symlinks = false < metadata_timeout = 1000 < < [pidi] < enabled = true < display = st7789 < rotation = 90 < < [mpd] < hostname = 0.0.0.0 < < [http] < hostname = 0.0.0.0 < < [audio] < mixer_volume = 40 < output = alsasink device=hw:sndrpihifiberry < < [spotify] < enabled = false < username = < password = < client_id = < client_secret =

Now performing Gavroche's modifications Reading package lists... Done Building dependency tree... Done Reading state information... Done mpc is already the newest version (0.33-1). mopidy-mpd is already the newest version (3.3.0-1). The following package was automatically installed and is no longer required: libfuse2 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Warning: The unit file, source configuration file or drop-ins of PIpod.service changed on disk. Run 'systemctl daemon-reload' to reload units. mv: cannot move 'frontend.py' to '/usr/local/lib/python3.7/dist-packages/mopidy_raspberry_gpio/frontend.py': No such file or directory

Done `

I determined the issue was that my Python version wasn't 3.7. Would any version of Python above 3.7 also work for installing and running PIpod?

PetitPrinc3 commented 4 months ago

Hi there, I have not tested what I am proposing, but it should work hopefully. You can either edit line 79 of install.sh as follows : mv frontend.py /usr/local/lib/python3.9/dist-packages/mopidy_raspberry_gpio/frontend.py Or you can force the installation of python 3.7.

Hope it helps and you get to enjoy the software.