PyPlcnextRsc requires Python 3.7.6 or later, while the Python 3 package available through the cited Optware/IPKG path is version 3.7.1. That IPKG interpreter cannot satisfy the library requirement. For a containerized application, use a base image whose package manager supplies a compatible Python version; the reported working path used Alpine and APK.
Identify the Version Conflict
| Environment | Python evidence | PyPlcnextRsc result |
|---|---|---|
| Optware/IPKG container | Python 3.7.1 | Below the required Python 3.7.6 minimum |
| Alpine/APK container | Exact version not reported | PyPlcnextRsc installation was reported working |
| PLC runtime with firmware 2022.0.3 | Python 3.8.11 | Meets the stated version minimum for direct PLC execution |
The evidence uses both “AXF2152” and “AXC F 2152.” Confirm the controller model from its label or project configuration before applying firmware-specific information.
Select the Deployment Path
If the application must run in Docker for deployment across PLCs and Windows servers, replace the IPKG-based image instead of trying to upgrade its Python 3.7.1 package. If containerization is unnecessary, firmware 2022.0.3 on the AXC F 2152 already includes Python 3.8.11 according to the supplied evidence.
An attempted Python 3.8 image using APT encountered an EOF error during apt-get update. Image size was suggested as a possible cause, but it was not confirmed. Removable SD-card storage was also discussed, so check available storage when diagnosing that path.
Build the Alpine/APK Container
- Use Alpine as the base image and install Python 3 and pip with APK.
- Install the required Python packages, including PyPlcnextRsc, with pip.
- Add the application, expose its TCP port, and start it with Python 3.
FROM alpine
RUN apk add --no-cache python3
RUN apk add --update py3-pip
RUN pip3 install mysql-connector
RUN pip3 install websockets
RUN pip3 install jsonschema
RUN pip3 install asyncio
RUN pip3 install -U PyPlcnextRsc
ADD main.py .
EXPOSE 4444/tcp
CMD [ "python3", "./main.py" ]
Verify the Result
Confirm inside the built container that the active Python interpreter is at least version 3.7.6 and that PyPlcnextRsc imports without an exception. Then start main.py and verify that the application listens on TCP port 4444. This separates interpreter and package failures from application-level communication problems.
FAQ
Why will PyPlcnextRsc not install with IPKG Python?
The cited IPKG package provides Python 3.7.1, but PyPlcnextRsc requires at least Python 3.7.6. Change the container base and package manager or use a compatible PLC runtime interpreter.
Which Docker base image worked for PyPlcnextRsc on the controller?
The reported working Dockerfile used alpine, installed Python 3 and pip with APK, and installed PyPlcnextRsc with pip3 install -U PyPlcnextRsc.
Which Python version is included with AXC F 2152 firmware 2022.0.3?
The supplied evidence states that firmware 2022.0.3 includes Python 3.8.11. That exceeds the stated PyPlcnextRsc minimum of Python 3.7.6 for applications running directly on the PLC.