本文介绍了在 Amazon EC2 上安装 numpy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Amazon EC2 服务器上安装 numpy 时遇到问题.我试过在虚拟环境中使用easy_install、pip、pip,在另一个虚拟环境中使用python 2.7 ...

I am having trouble installing numpy on an Amazon EC2 server. I have tried using easy_install, pip, pip inside a virtual env, pip inside another virtual env using python 2.7...

每次我尝试时,它都会失败并显示错误:gcc: internal compiler error: Killed (program cc1),然后我得到一堆 python 错误,使用 easy_install 我get: ImportError: No module named numpy.distutils, and with pip I get: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128).

Every time I try, it fails with the error: gcc: internal compiler error: Killed (program cc1), and then further down the line I get a bunch of python errors, with easy_install I get: ImportError: No module named numpy.distutils, and with pip I get: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128).

EC2 实例正在运行内核 3.4.43-43.43.amzn1.x86_64.有没有人解决过这个问题?Numpy对我来说一直很难安装,但我通常可以弄清楚......此时我不在乎它是否在它自己的virtualenv中,我只想安装它.

The EC2 instance is running kernel 3.4.43-43.43.amzn1.x86_64. Has anybody solved this problem? Numpy has always been hard for me to install, but I can usually figure it out... at this point I don't care whether it is in it's own virtualenv, I just want to get it installed.

推荐答案

我最终只是通过 yum 安装了 numpy,sudo yum install numpy.我想这是我目前能做的最好的事情.当使用 virtualenv 并且我需要 numpy 时,我会告诉它使用站点包.

I ended up just installing numpy through yum, sudo yum install numpy. I guess this is the best I can do for now. When working with virtualenv and I need numpy, I will tell it to use site packages.

感谢@Robert 的建议.

Thanks for the suggestion @Robert.

这篇关于在 Amazon EC2 上安装 numpy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-28 05:35
查看更多