Fresh Install Error - python setup.py egg_info

Any suggestions???

pi@brewpi:~ $ uname -a
Linux brewpi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux

pi@brewpi:~ $ cat /etc/*release*
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

pi@brewpi:~ $ curl -fsSL https://get.docker.com -o get-docker.sh
pi@brewpi:~ $ sudo sh get-docker.sh
# Executing docker install script, commit: a8a6b338bdfedd7ddefb96fe3e7fe7d4036d945a
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=armhf signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/raspbian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           24.0.0
 API version:       1.43
 Go version:        go1.20.4
 Git commit:        98fdcd7
 Built:             Mon May 15 18:48:45 2023
 OS/Arch:           linux/arm
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.0
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.4
  Git commit:       1331b8c
  Built:            Mon May 15 18:48:45 2023
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================

pi@brewpi:~ $ sudo usermod -aG docker pi

pi@brewpi:~ $ sudo apt-get install -y docker-compose
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docker-compose is already the newest version (1.21.0-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


pi@brewpi:~ $ wget -qO - https://www.brewblox.com/install | bash
INFO       Installing Apt packages... 
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 https://download.docker.com/linux/raspbian buster InRelease                                             
Hit:3 http://archive.raspberrypi.org/debian buster InRelease                                                  
Reading package lists... Done                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-venv is already the newest version (3.7.3-1).
python3-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
INFO       Brewblox dir is "/home/pi/brewblox" 
INFO       Brewblox release is "edge" 
INFO       Creating Python virtual env... 
INFO       Downloading brewblox-ctl... 
INFO       Installing Python packages... 
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in ./.venv/lib/python3.7/site-packages (18.1)
Requirement already satisfied: setuptools in ./.venv/lib/python3.7/site-packages (40.8.0)
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/61/86/cc8d1ff2ca31a312a25a708c891cf9facbad4eae493b3872638db6785eb5/wheel-0.40.0-py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.40.0
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing ./brewblox-ctl.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-5xga6h1g/setup.py'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-5xga6h1g/```

For a fresh install, we strongly recommend snapshotting / exporting any existing brewblox installation, and then flashing a new Raspberry Pi OS. Debian Buster and Python 3.7 are both very close to their End Of Life date.

If this is an older SD card, it may be that the SD card is about to expire. When sectors have reached their write # limit, they become read-only.

To update for posterity, and any other stubborn sys-admins out there…

Did re-install the rpi3b with Bullseye (same SD card). Did all the os and kernel updates, configured NTP, and then followed the current online brewblox instructions to install everything. This worked as advertised. (Thank you Bob and others!!!)

Installing python, docker, etc… manually first per my older brewblox deployment local SOP docs caused no end of misery. Out with the old. Adapt or die painfully.

Two configuration issues remaining, will start separate threads if I can’t figure these out.

  1. Figure out why the Tilt service data is graphing 8-hours behind the Spark data & current OS time/timezone.
  2. Set up the front-end with a LetsEncrypt SSL Cert

Good to hear it works again.

  1. Try mounting localtime as volume. See other services for example syntax.
  2. This may be trickier, as you don’t want to publicly expose the UI.

Thanks Bob!
re #2: It’s a local network security policy requiring no unencrypted web UI… all access will be from local subnets/vLAN. All other web front-ends are using LE certs and certbot’s DNS challenge to avoid the public ingress used by default. Need this pi to do the same and get the LE cert integrated to the traefik proxy front-end. As far as remote-ingress is concerned, our router has WG remote access services available when we need to get in.

On that note, there used to be a ‘brewblox-ctl setup’ that let us set a custom self-signed cert. What’s the current equivalent for that capability at a minimum?

Will move the SSL discussion back over to my other old thread - once I re-read it again :slight_smile:

The self-signed cert is stored in brewblox/traefik/. To use your own, define a traefik service in docker-compose.yml that overrides the one defined in docker-compose.shared.yml.

We never automated this configuration on our end, as there would be little added value. Setup used to ask (and install does now) whether you wanted to retain ./traefik/ files if they already existed.

Thanks again Bob.
Instead of re-configuring traefik, I’m going to simply overwrite the existing cert files in-place as part of our LE cert renewal process, and as part of my brewblox deployment/update processes. Least amount of customization.

1 Like