如何修复:ModuleNotFoundError:没有名为“ scipy”的模块导入错误

时间:2019-08-09 11:42:50

标签: python scipy pip

我正在使用mozilla设置语音识别软件,并希望使用预先训练的模型。

这是针对macosx的,我已经安装了pip和相关的scipy文件,但是当我运行python脚本时,我的系统似乎无法拉出scipy模块。难道这是从虚拟环境本身安装在另一个目录中的?

Terminal
(deepspeech-venv) Chabanis-MacBook-Pro:deepspeech chabani$ pip3 list
Package    Version
---------- -------
deepspeech 0.5.1  
numpy      1.17.0 
pip        19.2.1 
scipy      1.3.1  
setuptools 41.0.1 
wheel      0.33.4 

Python
import scipy.io.wavfile as wav // this is the issue here

Terminal - deepspeech path
(deepspeech-venv) Chabanis-MacBook-Pro:deepspeech chabani$ which deepspeech
/Users/chabani/tmp/deepspeech-venv/bin/deepspeech

=== RESTART: /Users/chabani/tmp/deepspeech-venv/lib/python3.7/activate.py ===
Traceback (most recent call last):
   File "/Users/chabani/tmp/deepspeech-venv/lib/python3.7/activate.py", line 7, in <module>
import scipy.io.wavfile as wav
ModuleNotFoundError: No module named 'scipy'

1 个答案:

答案 0 :(得分:-2)

尝试运行此命令:  pip3 install scipy