PaddleSpeech icon indicating copy to clipboard operation
PaddleSpeech copied to clipboard

paddle的numpy库版本和paddlespeech冲突

Open alittlenico opened this issue 1 year ago • 8 comments

按照文档,在conda虚拟环境先安装了paddle-gpu版本,再安装了paddlespeech。调用PaddleSpeech/examples/aishell3/vits/local/preprocess.sh预处理shell处理数据时,报错。根据报错应该是paddle的numpy和paddlespeech需要的版本不一致,我也不敢贸然修改numpy的版本,因为可能导致paddle出什么问题。有什么解决方法吗? python:3.9 numpy版本是1.26.2。 paddlepaddle版本: paddlepaddle-gpu 2.5.1.post112 paddlespeech版本:paddlespeech 1.4.1 除了numpy冲突外,还有一个[nltk_data] 错误。 报错如下: File "/home/inspur/ly416100210174/proj/PaddleSpeech/utils/gen_duration_from_textgrid.py", line 18, in import librosa File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/init.py", line 211, in from . import core File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/core/init.py", line 9, in from .constantq import * # pylint: disable=wildcard-import File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/site-packages/librosa/core/constantq.py", line 1059, in dtype=np.complex, File "/home/inspur/ly416100210174/miniconda3/envs/paddlepaddle/lib/python3.8/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 builtin complex. To avoid this error in existing code, 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. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: [nltk_data] Error loading averaged_perceptron_tagger: <urlopen error [nltk_data] [Errno -2] Name or service not known> [nltk_data] Error loading cmudict: <urlopen error [Errno -2] Name or [nltk_data] service not known>

alittlenico avatar Nov 27 '23 05:11 alittlenico

我用python3.10也遇到numpy冲突这个问题了,换成3.9好了

zhaojigang avatar Nov 30 '23 10:11 zhaojigang

我用python3.10也遇到numpy冲突这个问题了,换成3.9好了

还是不行

alittlenico avatar Dec 01 '23 06:12 alittlenico

根据报错原因:librosa/core/constantq.py", line 1059, in dtype=np.complex。 librosa的版本是:0.8.1

alittlenico avatar Dec 01 '23 06:12 alittlenico

有人能给点帮助吗 卡好久了

alittlenico avatar Dec 01 '23 06:12 alittlenico

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

alittlenico avatar Dec 01 '23 06:12 alittlenico

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

按照你的办法,解决。这版本问题,真烦,文档能写清楚就好了

Douflamingo666 avatar Dec 26 '23 08:12 Douflamingo666

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

感谢大佬,解决了

mlick avatar Jan 06 '24 03:01 mlick

解决,把某个评论区找到解决办法。librosa不变,numpy降级为1.23.5。

按照你的办法,解决。这版本问题,真烦,文档能写清楚就好了

怎么降级numpy?

zhouhao27 avatar Apr 21 '24 15:04 zhouhao27