Hi all,
This is my first time using VS Code and any Toradex product so please bear with my ignorance. I’m using VS Code on a Windows 11 machine to build a Python program to act as an SNMP agent with a serial port output.
I was able to add the package python3-pysmi
to the Dockerfile, and Dockerfile.debug files.
I was able to add pyserial and pysnmp to the requirements-*.txt files to load the appropriate python modules.
I’m trying to compile a custom MIB into a python module so it can be used to define my custom OIDs.
VS Code tells me I need to run the following command:
pysmi-compile --output-directory=/path/to/mibs MY-MIB.txt
When I run this command, I get an error
bash: pysmi-compile: command not found
When I add this command to my Dockerfiles and attempt a docker image compile, i also get an error.
47.43 Successfully installed pyasn1-0.6.1 pyserial-3.5 pysnmp-7.1.20 pysnmp-mibs-0.1.6
48.85 /bin/sh: 1: pysmi-compile: not found
------
Dockerfile:45
--------------------
44 | COPY requirements-release.txt /requirements-release.txt
45 | >>> RUN . ${APP_ROOT}/.venv/bin/activate && \
46 | >>> pip3 install --upgrade pip && pip3 install -r requirements-release.txt && \
47 | >>> rm requirements-release.txt && \
48 | >>> pysmi-compile --output-directory ${APP_ROOT}/mib snmptoserial-mib.txt
49 |
--------------------
ERROR: failed to solve: process "/bin/sh -c . ${APP_ROOT}/.venv/bin/activate && pip3 install --upgrade pip && pip3 install -r requirements-release.txt && rm requirements-release.txt && pysmi-compile --output-directory ${APP_ROOT}/mib snmptoserial-mib.txt" did not complete successfully: exit code: 127
What am I doing wrong?
Thanks in advance for the help!
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.85-7.2.0-00045-gf1a07aac82ca #1-Torizon SMP PREEMPT Thu Feb 27 10:29:52 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/49c1e75c2944eb5ef277d5370041fb06faf8dd24a4cba412b756d8e7b946f87b/0
Distro name: NAME="Torizon OS Upstream"
Distro version: VERSION_ID=7.2.0-build.13
Distro variant: VARIANT="Docker"
Hostname: colibri-imx7-emmc-12828052
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Colibri iMX7D 1GB (eMMC) on Colibri Evaluation Board V3
Toradex version: 0039 V1.1B
Serial number: 12828052
Processor arch: armv7l
------------------------------------------------------------