-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: found no usable tomli #1615
Comments
I couldn't reproduce this, QEMU's build script creates a python venv and installs needed packages inside, this is the output in my case on a clean ubuntu 22.04 container (instantiated using lxc -n ubuntu-test -t download):
As you can see it installed tomli inside the virtual environment, so there is no need to install it on the host OS as well. Maybe there it can't install the package in your case, network issues ? |
I will try again with the same Dockerfile. It might have been a network issue, as you suggested. I'll let you know. |
It happened again, and it's on GitHub Actions. It's probably not a network issue on their side. Here's the link to the logs: https://github.com/karaketir16/test-docker/actions/runs/11913130748/job/33198181961#step:3:12935.
|
That's exactly where it fails—it cannot create the virtual environment (venv) |
Ah now I managed to reproduce this... https://wiki.qemu.org/ChangeLog/8.2 : https://wiki.qemu.org/ChangeLog/9.1 : In our case we only run make_report (which compiles QEMU etc) on ubuntu 24.04 runners that come with python 3.12 (so it doesn't require tomli). However your dockerfile is for ubuntu 22.04 that has python 3.10, in my setup (with the ubuntu 22.04 container) I noticed I was still building 8.2, that's why it worked fine. So if someone does make_report on ubuntu 22.04 (which is disabled in our CI) they'll need to install tomli. I guess it makes sense to add this to the README, it should be true for other distros that use python < 3.11 as well. |
I checked the following Docker images:
I mean "has" to indicate the default Python3 version available when installed. I couldn’t find Docker images for other distributions. Installing Here’s a sample script for clarity: HAVE_TOMLLIB = True
try:
import tomllib
except ImportError:
try:
import tomli as tomllib
except ImportError:
HAVE_TOMLLIB = False
if not HAVE_TOMLLIB:
raise Exception("Neither tomllib nor tomli found.")
else:
print("Tomli or tomllib found. No problem.") |
Can somebody clarify what, if anything, needs to be done to address and close this issue? E.g.
|
|
Thanks @karaketir16.
In my opinion if
My personal preference would be, if possible, for the README to simply reference |
Error while building with
build-sim SIM=qemu
in Ubuntu 22.04Dockerfile to reproduce
The text was updated successfully, but these errors were encountered: