Fresh Install Error - python 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="10 (buster)"

pi@brewpi:~ $ curl -fsSL -o
pi@brewpi:~ $ sudo 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

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 "" | 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] 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 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
  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
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
  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: install

Visit to learn about rootless mode.

To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to

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:


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 - | bash
INFO       Installing Apt packages... 
Hit:1 buster InRelease
Hit:2 buster InRelease                                             
Hit:3 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:,
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
Installing collected packages: wheel
Successfully installed wheel-0.40.0
Looking in indexes:,
Processing ./brewblox-ctl.tar.gz
  Installing build dependencies ... done
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-5xga6h1g/'
Command "python 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