oref0 icon indicating copy to clipboard operation
oref0 copied to clipboard

Install on Debian Bullseye fails due to python2 requirements

Open sharbi opened this issue 4 years ago • 1 comments

Bug description: Using most recent Raspbian Version 11 (Bullseye) the install fails during the line 56: https://github.com/openaps/oref0/blob/acb0150021e7bf284b6741a9510076a13f690747/bin/openaps-install.sh#L56 Throwing the error: E: Package 'python pip' has no installation candidate Due to python2 being removed on this version of Raspbian.

To Reproduce Steps to reproduce the behavior:

  1. Flash bullseye to new SD card
  2. Run usual installation process
  3. See error

Expected behavior Expected installation to complete or at least get through python installations

Setup Information (please complete the following information):

  • Pump type: Medtronic 722
  • CGM type: Libre with xDrip+
  • Rig type: Pi Zero 2 running Raspbian Bullseye
  • oref0 version: 0.62 master

Additional context Is python2 required for installation? Or would it be possible just by updating the installation code to python3-pip?

Thanks!

sharbi avatar Jan 19 '22 01:01 sharbi

Python2 is required for installation because most of the python in oref0 is python2 Python3-pip is installed later on (during oref0-setup) but this is of no use because we need python2 versions of the modules.

Prior to Bullseye, Debian did the 'smart' thing and assumed that references to 'python' meant Python 2 (meaning that if you want to use Python3 you had to #!/usr/bin/python3 (or similar).

Bullseye turned this on it's head and made Py3 the default, while removing py2 pip from the distro.

The 'fix' is 2-fold: install the python-is-python2 and python-dev-is-python2 packages, and manually install pip2 from pypa with curl.

A further change that is needed, is to add awareness of aarch64 to oref0-setup's go install routines, because 64bit Bullseye for raspberry pi is now a thing.

Also, because the install routine uses openaps-install.sh from master even-if you are installing DEV branch, this has to be patched in both branches for it to work when installing DEV.

Patches submitted to address this - #1428 (master) and #1429 (dev)

dcacklam avatar Feb 25 '22 23:02 dcacklam