How to install Python on a PCF200 controller

What’s the best way to install Python to 750-8212 PLC (with FW26)?

Hello, depending on the python build i would recommend using docker.

1 Like

Hi @pehaa ,

you can use an image from dockerhub to use python functionality for the PFC.

https://hub.docker.com/repository/docker/wagoautomation/python/general

Alternatively, you can create a dockerfile to add the required Python & libraries to an Alpine base image.

Something like this;

FROM alpine:3.19

# This hack is widely applied to avoid python printing issues in docker containers.
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13
ENV PYTHONUNBUFFERED=1

RUN echo "**** install Python ****" && \
    apk add --no-cache python3 && \
    if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
    \
    echo "**** install pip ****" && \
    rm /usr/lib/python3.11/EXTERNALLY-MANAGED && \
    python -m ensurepip && \
    rm -r /usr/lib/python*/ensurepip && \
    if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
    pip install --no-cache --upgrade pip setuptools wheel
2 Likes