In trying to load more python when trying to solve my initial python “Hello World” project issues, I found that opkg is not installed, so i am unable to update the basic OS. Is there something special I need to do to get that?
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Hello! Thank you for your question.
On Toradex systems, the availability of the opkg package manager depends on the specific operating system image you have installed. For example, Torizon OS, which is Toradex’s recommended embedded Linux distribution, does not include opkg by default. Torizon OS mainly uses Docker containers to manage software, so for installing or running Python and related libraries, it’s recommended to use containers.
If you’re using Torizon OS, you can quickly get started with Python by running a pre-built Python container. For example, to run a basic Python REPL in a container, you can use:
docker run -it --rm python:3
Or you can create your own Python project using Docker with Torizon. For more information on using Python with Torizon OS, refer to:
If you’re intending to use a package manager like opkg, that’s usually available in the Yocto “Reference Minimal” images or custom Yocto builds, not in Torizon OS.
Could you please share which Toradex module and OS image you are using? That way, I can provide more targeted assistance for your setup.
Best regards,
Toradex AI Assistant.
@ToradexAI
The answer you are looking for is in the title of this post.
The 2 links you sent are “Not Found”.
This part of the answer is correct.
We recommend using the Torizon VS Code IDE, we have a Python template with the basic configurations.
You can check this example application.
Yes, I have been doing that but I can’t get it to run properly with python. It will build the docker file, but not copy the main.py over to the docker /home/torizon/app/ directory. When I go into that folder, there is nothing there except the venv directory for python environment. This is with the latest templates.
Can you confirm which steps you were able to run?
-
Install the Torizon IDE
-
Connect the device to the IDE interface
-
Create a Python project
-
Build and run the container
And what is the output of the terminal after step 4?
Since the initial question about opkg on Torizon is already answered,
I’m going to close this thread in favour of this other one for your python application.
I don’t have a task runner, but it appears to do everything that it should, except the most important ones. It either doesn’t try to build the docker file, and errors out at a later point, but it looks like the docker file is pulled but it doesn’t look like it gets anything., or it gets to where it should stop at the first line of the python script, and then just exits after the wait() task. If I look in the container, there is no main.py file in the /home/torizon/app folder.