Closed Flyfish233 closed 5 months ago
You've closed the issue, does that mean you've solved the problem? If so, how?
Yeah, scikit-learn == 1.1.3
won't work on latest Chaquopy. Upgrade to latest 1.3.2 on pypi solved this issue but 1.1.3 still not working.
The only Python version that has both of those scikit-learn versions is 3.9. Was that the Python version of your app, or did you change that at the same time?
Yes, I have never used any version other than Python 3.9, locked Python version to 3.9.
This was caused by a change in Chaquopy 15 which applies the multiprocessing
monkey patches when multiprocessing
is first imported, rather than doing it during Python startup as before. But an older version of one of the monkey patches is built into our wheels of scikit-learn 1.1.3, and when that version is applied first, which will now happen if sklearn
is imported before multiprocessing
, Chaquopy's own version will fail.
However, we never actually needed the patch in that version of scikit-learn, because it was released through the pypi-13.1 repository and was therefore only visible to versions of Chaquopy which already had the patch. So I'll fix this by making new builds of version 1.1.3 with the patch removed.
Meanwhile, you can work around this by importing multiprocessing
before importing sklearn
.
I've now released new builds of scikit-learn 1.1.3, and saved the recipe in #1078. Thanks for the report.
This exception occurs when updating the Chaquopy plugin version from 14.0.2 to 15.0.1 with no changes to any part of the code.
Chaquopy version
Downgrading to
id("com.chaquo.python") version "14.0.2" apply false
will fix this problem. But I don't hope so.Devices or emulators where the issue happens
Android 13, Wear OS Emulator
Relevant parts of your code
Gradle: install("scikit-learn == 1.1.3")
code:
It happens during the import, so the following minimal code snippet will throw an error.
neuro.py
Describe your issue