Open raivisdejus opened 5 months ago
Also having this issue but on Ubuntu 24.04. Any fix without needing to rebuild and compile things from scratch?
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "/home/host/.local/bin/piper", line 5, in <module>
from piper.__main__ import main
File "/home/host/.local/lib/python3.11/site-packages/piper/__init__.py", line 1, in <module>
from .voice import PiperVoice
File "/home/host/.local/lib/python3.11/site-packages/piper/voice.py", line 9, in <module>
import onnxruntime
File "/home/host/.local/lib/python3.11/site-packages/onnxruntime/__init__.py", line 23, in <module>
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File "/home/host/.local/lib/python3.11/site-packages/onnxruntime/capi/_pybind_state.py", line 32, in <module>
from .onnxruntime_pybind11_state import * # noqa
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
File "/home/host/.local/bin/piper", line 5, in <module>
from piper.__main__ import main
File "/home/host/.local/lib/python3.11/site-packages/piper/__init__.py", line 1, in <module>
from .voice import PiperVoice
File "/home/host/.local/lib/python3.11/site-packages/piper/voice.py", line 9, in <module>
import onnxruntime
File "/home/host/.local/lib/python3.11/site-packages/onnxruntime/__init__.py", line 57, in <module>
raise import_capi_exception
File "/home/host/.local/lib/python3.11/site-packages/onnxruntime/__init__.py", line 23, in <module>
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/host/.local/lib/python3.11/site-packages/onnxruntime/capi/_pybind_state.py", line 32, in <module>
from .onnxruntime_pybind11_state import * # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError
I have an example space on Huggingface with
piper-tts
as dependency. Starting the space I get error:Adding requirement for
numpy==1.26.4
fixes the issue, but most likely some adjustment topiper-tts
dependencies can prevent it in the first place