chaquo/chaquopy

ModuleNotFoundError: No module named 'cgi'

priyankoza opened this issue · 2 comments

What I am trying to install dependencies in flutter application numpy, scipy (maybe more) during build it shows no module named cgi found

Chaquopy version "15.0.1"

chaquopy {
defaultConfig {
pip {
install("scipy")
install("numpy")
}
}
productFlavors { }
sourceSets { }
}

Error That I am getting while build
ModuleNotFoundError: No module named 'cgi'
Chaquopy: Exit status 1

This is probably because you're using Python 3.13, in which the cgi module has been removed from the standard library. Chaquopy 15 only supports Python 3.8-3.12.

It'll probably be enough to simply install the older version, and then set your app to use the same version. But in some situations you may also need to use the buildPython setting.

Python 3.13 support will be added in the next version of Chaquopy, which will come out shortly after Python 3.13.0 does (#1212).