You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chaquopy {
defaultConfig {
version = "3.10"
pip {
// A requirement specifier, with or without a version number:
install "numpy"
install "flask"
// And more
}
}
}
and I get the following error log:
Warning: Python version 3.10 may have fewer packages available. If you experience problems, try switching to version 3.8.
...
Chaquopy: Installing for arm64-v8a
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-13.1
Collecting numpy
Downloading https://chaquo.com/pypi-13.1/numpy/numpy-1.26.2-0-cp310-cp310-android_21_arm64_v8a.whl (5.0 MB)
ERROR: Package 'numpy' requires a different Python: 3.8.10 not in '>=3.9'
Chaquopy: Exit status 1
I realized I was using the wrong build pipeline, and Python 3.10 wasn’t installed correctly on the build machine for that workflow.
As a suggestion, perhaps there could be a clearer error message if Python is not installed in the correct version on the build machine. It might help others troubleshoot similar issues more quickly.
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion. We do display a warning at the pyc-compilation stage if the correct Python version is not found, but evidently it can also cause a problem when running pip, so an early warning of a version mismatch would be a good idea, along with a link to the buildPython documentation.
If anyone else sees this error, the solution is:
Install a version of Python on your build machine which matches the Python version used by your app. In the above example, that would be Python 3.10.
Remove any buildPython lines from your build.gradle file, and try rebuilding your app – Chaquopy will usually be able to find the correct Python version automatically.
If you still get the same error, add a buildPython line to point Chaquopy at the correct Python executable.
mhsmith
changed the title
Display early warning if correct buildPython version is not found
Package 'numpy' requires a different Python: 3.8.10 not in '>=3.9'
Dec 17, 2024
Originally posted by @Michu44 in #1289 (comment)
module build.gradle
and I get the following error log:
I realized I was using the wrong build pipeline, and Python 3.10 wasn’t installed correctly on the build machine for that workflow.
As a suggestion, perhaps there could be a clearer error message if Python is not installed in the correct version on the build machine. It might help others troubleshoot similar issues more quickly.
The text was updated successfully, but these errors were encountered: