-
Notifications
You must be signed in to change notification settings - Fork 132
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
Update scipy package version #648
Comments
Why specifically do you need the newer version? Please provide some example code if possible. |
We rely on the function |
I can't find any mention of |
I can't find any mention to it either; we found an inconsistency between version back in November but I was not able to retrieve back the exact issue. If I find it I will report back here. |
We generally update all packages when we move to a new version of Python, with additional updates if users have a specific need for a newer version and the build is not too difficult. We're currently planning to move to Python 3.10 later this year, so we'll update SciPy then. But if you can remember the details of your issue, please post them here and we'll consider updating it earlier. If anyone else needs a new version of this package, please click the thumbs up button above, and post a comment explaining why you need it. |
Hi Malcolm. We have just found the problematic piece of code: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.median_abs_deviation.html This function was implemented in version 1.5.0, and we use it in several parts of our codebase. Should I expect this to be updated later this year, as you suggested in your previous message? To be fair, this one is pretty easy to implement without scipy.. |
Yes, that's correct. |
Chaquopy now supports Python 3.10, but all SciPy builds are currently blocked because we don't have a working process for setting up an Android Fortran compiler. We did have such a process in 2020 when we moved to Python 3.8, but it hasn't been updated for the fact that build-wheel no longer uses a standalone NDK toolchain. See target/build-fortran.sh for more details. It may also be worth looking at what Kivy's python-for-android does, since they have Fortran support now. |
Hi, following Kivy's method I could build a Python 3.9 version of Scipy. Basically I downloaded https://github.com/mzakharo/android-gfortran/releases/download/r21e/gcc-arm64-linux-x86_64.tar.bz2 and used the provided Fortran compiler. However I had issues with pybind11 missing header and fixed it by patching
did I miss something in the build process? |
Thanks, this could be useful. Which ABIs have you built? And what testing have you done? There are some simple tests in the repository which you can run as described in "Testing a package" in the README. Please create a PR with your changes, and also include:
|
That was only preliminary work to assess feasibility, I only built for arm64-v8a and succeed to load it and read a simple Python constant from the package on Android, I still have to run more tests. Fortran compiler setup was also manual: I downloaded the above package and override my own gfortran using Still have additional tests to run and additional packages to check and then I'll try to create a PR. |
Additional info: I'm still stuck with 1.4.1 version but I could build it for Python 3.9 and it passes tests (except some deprecation warning due to numpy 1.20) |
Since 1.9 SciPy build process has been rewrote to use Meson, and that's supposed to help cross-compilation: |
Thanks to the Fortran instructions from @pasdeloup, I've now built and released SciPy 1.4.1 for Python 3.9. Unfortunately this version is too old to build for Python 3.10. The patches to remove the NumPy references are because the Android native libraries in NumPy can't be imported on Linux. So we need to either reduce it to just importing the pure-Python modules, or remove the imports entirely and replace them with something else. Based on your link, it looks like newer versions of SciPy have better support for cross-compilation, which may allow many of our patches to be removed. However, to support Meson or any other build system other than Setuptools, we'll have to remove the hack in build-wheel which removes the pyproject.toml file. Since this file is increasingly being used for other critical things, we need to fix this anyway even for some Setuptools-based packages (e.g. #866 and #812), so I'll look at that very soon. |
This has now been done. As a result, any requirements listed in a pyproject.toml's For example, the version of setuptools in NumPy's pyproject.toml file failed to detect some math functions, so I patched it to use the same version as in #935. I then verified that NumPy 1.23.3 and SciPy 1.4.1 can still build and pass the tests, with Python 3.9 and arm64-v8a. |
Thanks to @pasdeloup in #949, SciPy 1.6.3 is now in the public repository for Python 3.9. Unfortunately this version isn't compatbile with Python 3.10 or later. As for Python 3.8, SciPy 1.6.3 should also be compatible with NumPy 1.19.5, which is probably the last version we'll release in the main repository for Python 3.8 because of #570. But that combination fails to build, and it's not immediately obvious how to fix it: Error message
|
I was able to build SciPy 1.6.3 against Numpy 1.20.3 for Python 3.8, and when used together, they passed all the tests on both ABIs. But if you try to use the SciPy build with NumPy 1.19.5, you get this error:
So if you want to use SciPy 1.6.3 on Python 3.8, you'll have to add this line to the
|
The newest SciPy version that was requested above was 1.5.0, so I'm going to close this issue now. If you need a newer SciPy version than 1.6.3, please create a separate issue and explain exactly why you need it. |
The current supported
scipy
version is1.4.1
which was released +2.5 years ago.As many changes have been developed since, and the library is one of the most popular ones in the Python ecosystem, I'd like to request an update of this library to a newer version.
Thank you!
The text was updated successfully, but these errors were encountered: