Docker on RaspBerryPi: "pyinit_main: can't initialize time" when running "RUN pip install pyserial" from DOCKERFILE

Viewed 271

I have a RaspberryPi (Raspberry Pi 3 Model B Plus Rev 1.3, ARMv7 Processor rev 4 (v7l), 32 bit). The system thereon is a Raspbian GNU/Linux 9 (stretch) with the lastest apt update/apt-get upgrade.

I try to run the following DOCKERFILE:

FROM python:3.8-alpine


# install required libs to exercise code 
RUN pip install pyserial

# the actual python code
ADD myFile.py
CMD [ "python", "./myFile.py"]

When building the Dockerfile (docker build -t cryo-logger .) I get the following error when RUN pip install pyserial is called:

Fatal Python error: pyinit_main: can't initialize time
Python runtime state: core initialized PermissionError:
[Errno 1] Operation not permitted

Current thread 0x76fb7390 (most recent call first): <no Python frame>

I already tried things suggested in other threads:

  • sudo apt search libseccomp returns:

    golang-github-seccomp-libseccomp-golang-dev/oldoldstable 0.0~git20150813.0.1b506fc-2+deb9u1 all golang bindings for libseccomp

    libseccomp-dev/oldoldstable 2.3.1-2.1+deb9u1 armhf high level interface to Linux seccomp filter (development files)

    libseccomp2/oldoldstable,now 2.3.1-2.1+deb9u1 armhf [installiert] high level interface to Linux seccomp filter

    seccomp/oldoldstable 2.3.1-2.1+deb9u1 armhf helper tools for high level interface to Linux seccomp filter

  • Tried docker build ... --platform ...arm7...

0 Answers
Related