我完全撞到了一堵砖墙。我试图在预先配置了Tensorflow的AWS实例上安装SciPy。该实例没有apt-get
包管理器,因此我被迫使用pip
所以我尝试了udo /usr/local/bin/pip install scipy
请注意,我包含路径,因为我以某种方式搞砸了对pip
然后它首先抛出此错误: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