在AWS Tensorflow实例中安装SciPy

时间:2016-03-29 01:44:39

标签: python amazon-web-services numpy scipy

我完全撞到了一堵砖墙。我试图在预先配置了Tensorflow的AWS实例上安装SciPy。该实例没有apt-get包管理器,因此我被迫使用pip

所以我尝试了udo /usr/local/bin/pip install scipy

请注意,我包含路径,因为我以某种方式搞砸了对pip

的sudo访问权限

然后它首先抛出此错误:Failed building wheel for scipy

然后它尝试运行setup.py clean并抛出此错误

Command "/usr/bin/python -u -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-
e0UuQe/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --
record /tmp/pip-qKUiUV-record/install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in /tmp/pip-
build-e0UuQe/scipy/

我的AWS实例正在运行[ec2-user@ip-172-31-28-195 ~]$ uname -a Linux ip-172-31-28-195 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

更新

我已经成功安装了SciPy,但是当我运行包含该模块的python脚本时,它会抛出no module错误

成功安装:

[ec2-user@ip-172-31-28-195 ~]$ sudo yum install scipy
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
Package python26-scipy-0.12.1-1.8.amzn1.x86_64 already installed and latest version
Nothing to do

错误:

[ec2-user@ip-172-31-28-195 udacity]$ 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

0 个答案:

没有答案