Dear AUR folks,

Last week, the python-numpy package was upgraded to v2.0.
Since then, extra/python-tensorflow [1] has been raising a runtime error:

```sh
$ sudo pacman -Syu python-tensorflow
[…]
$ pacman -Q python-tensorflow python-numpy
python-tensorflow 2.16.1-9
python-numpy 2.0.0-1
$ /usr/bin/python -c 'import tensorflow'
[…]
  File 
"/usr/lib/python3.12/site-packages/tensorflow/python/ops/numpy_ops/np_dtypes.py",
 line 30, in <module>
    complex_ = np.complex_
               ^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/numpy/__init__.py", line 397, in 
__getattr__
    raise AttributeError(
AttributeError: `np.complex_` was removed in the NumPy 2.0 release. Use 
`np.complex128` instead.. Did you mean: 'complex64'?
```

For the full output, see: https://0x0.st/Xa9Q.log

Given that upstream is still working on NumPy 2 support [2], the error
message makes sense.

Users can fix this incompatibility for themselves by either

a) manually downgrading `python-numpy` to v1.x from their cache; or

b) installing `python-numpy1` [3] from the AUR, which I uploaded today.

Judging from the progress of the upstream issue [2], NumPy v2 support
in tensorflow may not be exactly around the corner. Until then, users
are going to have a hard time figuring out one of these workarounds
on their own. I think all packages from core and extra are supposed
to Just Work.
So I wonder what might be a more user-friendly way to fix
`extra/python-tensorflow` for everyone?

Would it make sense to move `python-numpy1` from the AUR to `extra`
to allow `python-tensorflow` to depend on `python-numpy1`?


[1]: https://archlinux.org/packages/extra/x86_64/python-tensorflow/

[2]: https://github.com/tensorflow/tensorflow/issues/67291

[3]: https://aur.archlinux.org/packages/python-numpy1


Regards
Claudia (aka Auerhuhn)

Reply via email to