Open gxmlfx opened 1 year ago
+1,有同样的问题
我也遇到了一样的问题,一个个的改底层,找到报错的地方,把np.float还有np.complex去掉np.就好了
原来在setup.py的Librosa库是0.8.1,太老了,然后我们的numpy比较新,就有这个问题。 直接把Librosa删掉,安装0.10.0就行
万分感谢 ------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleSpeech" @.>; 发送时间: 2023年5月10日(星期三) 中午11:49 @.>; @.**@.>; 主题: Re: [PaddlePaddle/PaddleSpeech] numpy1.24.3报错 (Issue #3235)
原来在setup.py的Librosa库是0.8.1,太老了,然后我们的numpy比较新,就有这个问题。 直接把Librosa删掉,安装0.10.0就行
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Installing collected packages: msgpack, soxr, lazy-loader, Librosa Attempting uninstall: Librosa Found existing installation: librosa 0.8.1 Uninstalling librosa-0.8.1: Successfully uninstalled librosa-0.8.1 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. paddleaudio 1.1.0 requires librosa==0.8.1, but you have librosa 0.10.0 which is incompatible. paddlespeech 0.0.0 requires librosa==0.8.1, but you have librosa 0.10.0 which is incompatible. Successfully installed Librosa-0.10.0 lazy-loader-0.2 msgpack-1.0.5 soxr-0.3.5
依然有依赖项报错了
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleSpeech" @.>; 发送时间: 2023年5月10日(星期三) 中午11:49 @.>; @.**@.>; 主题: Re: [PaddlePaddle/PaddleSpeech] numpy1.24.3报错 (Issue #3235)
原来在setup.py的Librosa库是0.8.1,太老了,然后我们的numpy比较新,就有这个问题。 直接把Librosa删掉,安装0.10.0就行
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
还有一种方式,librosa不变,numpy降级为1.23.5
The deprecation for the aliases np.object, np.bool, np.float, np.complex, np.str, and np.int is expired (introduces NumPy 1.20). Some of these will now give a FutureWarning in addition to raising an error since they will be mapped to the NumPy scalars in the future.
这个方法可行,只会警告,但不会报错,谢谢你呀
------------------ 原始邮件 ------------------ 发件人: "PaddlePaddle/PaddleSpeech" @.>; 发送时间: 2023年5月10日(星期三) 中午12:57 @.>; @.**@.>; 主题: Re: [PaddlePaddle/PaddleSpeech] numpy1.24.3报错 (Issue #3235)
还有一种方式,librosa不变,numpy降级为1.23.5
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
官方的docker镜像也会提示numpy complex的问题。
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.7/dist-packages/librosa/core/constantq.py:1059: DeprecationWarning: np.complex
is a deprecated alias for the builtin complex
. To silence this warning, use complex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
但是这里可以继续,这似乎是一个仍可用的numpy版本
运行paddlespeech_server start会报 raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
log如下:
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.7/dist-packages/librosa/core/constantq.py:1059: DeprecationWarning: np.complex
is a deprecated alias for the builtin complex
. To silence this warning, use complex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
dtype=np.complex,
Traceback (most recent call last):
File "/usr/local/bin/paddlespeech_server", line 5, in
那个只是warning,并不是报错。 那个zip的错误,可以看看这个issue:https://github.com/PaddlePaddle/PaddleSpeech/issues/1925
感谢,我试一下
我最后把这个问题移到【安装报错留言区】了,感觉这样好一些,本质上不是代码问题,只是环境上的问题
conda install -c conda-forge librosa
原来在setup.py的Librosa库是0.8.1,太老了,然后我们的numpy比较新,就有这个问题。 直接把Librosa删掉,安装0.10.0就行
请问在官方的这个lab页面里面要怎么做这个操作啊 https://aistudio.baidu.com/bd-gpu-01/user/3279555/6931268/lab/tree/main.ipynb
还有一种方式,librosa不变,numpy降级为1.23.5
The deprecation for the aliases np.object, np.bool, np.float, np.complex, np.str, and np.int is expired (introduces NumPy 1.20). Some of these will now give a FutureWarning in addition to raising an error since they will be mapped to the NumPy scalars in the future.
https://numpy.org/devdocs/release/1.24.0-notes.html
refer:coqui-ai/TTS#2442
谢谢 也解决了我的问题
pip install -U librosa
pip freeze | grep librosa
# 1.10.*
General Question
刚装好后,运行了: paddlespeech asr --lang zh --input zh.wav log如下: Traceback (most recent call last): File "/home/user1/miniconda3/envs/paddle/bin/paddlespeech", line 8, in
sys.exit(_execute())
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlespeech/cli/entry.py", line 40, in _execute
exec("from {} import {}".format(module, cls))
File "", line 1, in
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlespeech/cli/asr/init.py", line 14, in
from .infer import ASRExecutor
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlespeech/cli/asr/infer.py", line 24, in
import librosa
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/librosa/init.py", line 211, in
from . import core
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/librosa/core/init.py", line 9, in
from .constantq import * # pylint: disable=wildcard-import
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/librosa/core/constantq.py", line 1059, in
dtype=np.complex,
File "/home/user1/miniconda3/envs/paddle/lib/python3.9/site-packages/numpy/init.py", line 305, in getattr
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'complex'.
np.complex
was a deprecated alias for the builtincomplex
. To avoid this error in existing code, usecomplex
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.complex128
here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations