`没有名为SciPy的模块,即使它安装在AWS Tensorflow实例上

时间:2016-03-29 13:56:39

标签: python amazon-web-services module scipy yum

我正在运行预安装了tensorflow的AWS AMI实例。但是,它没有SciPy,所以我不得不安装它。我已使用yum install scipy

成功安装了它
udacity]$ sudo yum install scipy
Loaded plugins: dkms-build-requires, priorities, update-motd, upgrade-helper
2 packages excluded due to repository priority protections
Package python26-scipy-0.12.1-1.8.amzn1.x86_64 already installed and latest version
Nothing to do

但是当我去运行程序时,我得到了这个

$ python assignment_1.py
Traceback (most recent call last):
  File "assignment_1.py", line 7, in <module>
    from scipy import ndimage
ImportError: No module named scipy

这与之前的帖子here

有关

显示了Python版本:

[ec2-user@ip-172-31-28-195 ~]$ which python
/usr/bin/python
[ec2-user@ip-172-31-28-195 ~]$ python -V
Python 2.7.10

更新

SciPy正在展示python2.6,所以我尝试了下面的内容,但即使我安装了iPython,我现在也遇到了错误。这是另一个版本问题吗?

[ec2-user@ip-172-31-28-195 udacity]$ sudo yum install ipython
Loaded plugins: dkms-build-requires, priorities, update-motd, upgrade-helper
amzn-graphics/latest                                              | 2.1 kB     00:00
amzn-main/latest                                                  | 2.1 kB     00:00
amzn-updates/latest                                               | 2.3 kB     00:00
2 packages excluded due to repository priority protections
No package ipython available.
Error: Nothing to do
[ec2-user@ip-172-31-28-195 udacity]$ python2.6 assignment_1.py
Traceback (most recent call last):
  File "assignment_1.py", line 6, in <module>
    from IPython.display import display, Image
ImportError: No module named IPython.display

版本:

[ec2-user@ip-172-31-28-195 udacity]$ ipython --version
4.1.2

0 个答案:

没有答案