-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
pydantic installation succeeds, but throws ModuleNotFoundError at runtime #2011
Comments
Calling this out for others since I couldn't replicate it (or particularly understand why this is happening) but wheels for x86-64 are being installed for Android:
That aside, we'll need to be a little more judicious in which versions of these packages we try to use. The openai package (and more and more of Python at large) is growing its dependency on Rust. Given that building packages using Rust isn't quite nailed down yet for Android, I was able to avoid this issue using these requirements: requires = [
"openai < 1.40",
"pydantic < 2",
] |
I think I've seen similar issues before – Chaquopy uses a number of techniques to make the build fail quickly and with a comprehensible message if it attempts to compile native code, but it looks like none of them apply to Rust. If the user doesn't have the Rust tools installed, then the build will fail similarly to chaquo/chaquopy#1227. But if they do have Rust installed, then it'll build a wheel for the build machine (in this case Windows). So the build appears to succeed, but the module can't be loaded on Android. |
Yes, I have installed rust - app simply does not build when it was not installed. After installation app builded succesfuly, but issue described above by me occured |
The problem was solved!
Problem was solved! Thank you very much. Changing to older openai library removes the requirement for usage of Rust! |
Describe the bug
I try to use openai library in my project. In briefcase dev, program runs just fine, but when trying to run briefcase run android -r ModuleNotFound error pops up like the package was not installed. In the logs you can clearly see that all required packages are installed without any problem. I tried re-creating my app and building it with -u -r. Nothing seen about this topic resolves my problem.
Steps to reproduce
Expected behavior
App that is seeing all the required modules that are clearly imported and compiled into the project
Screenshots
No response
Environment
Logs
briefcase.2024_10_04-16_00_53.run.log
Additional context
No response
The text was updated successfully, but these errors were encountered: