安装scipy软件包后,"ImportError:没有名为scipy的模块"

Phi*_* R. 6 python pip scipy raspbian

所以我最近尝试使用我的Raspbian(Debian for Raspberry Pi)操作系统安装scipy sudo pip install scipy.该命令工作没有太多麻烦,我可以看到位于下面的文件pi/build/scipy.

但是,当我真的尝试在python程序中导入它时,它让我ImportError: No module named scipy不知道如何将操作系统指向正确的位置来导入scipy模块.

Bra*_*iam 6

除非你在pip环境中,否则它根本不起作用.我建议你安装python-scipy包,这样可以保证你的工作:

?  ~  sudo apt-get install python-scipy
Selecting previously unselected package python-decorator.
(Reading database ... 252269 files and directories currently installed.)
Preparing to unpack .../python-decorator_3.4.0-2_all.deb ...
Unpacking python-decorator (3.4.0-2) ...
Selecting previously unselected package python-scipy.
Preparing to unpack .../python-scipy_0.13.3-2+b1_i386.deb ...
Unpacking python-scipy (0.13.3-2+b1) ...
Setting up python-decorator (3.4.0-2) ...
Setting up python-scipy (0.13.3-2+b1) ...
?  ~  python
Python 2.7.7 (default, Jun  3 2014, 23:36:29) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> 
Run Code Online (Sandbox Code Playgroud)