在Amazon EC2 linux服务器上安装pandas的步骤是什么?

时间:2013-11-15 22:13:04

标签: linux amazon-ec2 installation pandas

当我跑步时:

python setup.py install

在亚马逊ec2 linux实例上,我得到:

Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'

这是怎么回事?在EC2 linux服务器上安装pandas是否有替代的,直接的wat?熊猫的图像是否比其他图像更好?

THX!

2 个答案:

答案 0 :(得分:3)

需要构建工具

确保为gcc,g ++,gfortran和python-dev安装系统软件包。这是我要使用的设置。首先更新apt-get,然后安装......

$ apt-get update
$ apt-get install build-essential gfortran gcc g++ python-dev

通过系统软件包安装

根据图像,pandas可能是系统包的一部分

$ apt-get install python-pandas

但几乎可以肯定会有几个版本落后。

使用从源

构建的pip

但是,如果您想要最新且最好的,请从源代码安装。这是一个安装setuptools& amp; pip接着是numpy和pandas

# Update your apt-get:
apt-get update

# Pre-requisities
apt-get install build-essential gfortran gcc g++ curl wget python-dev

# Make sure you have the latest setup tools 
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python2.7

# Get pip
curl --show-error --retry 5 https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7

pip install numpy pandas

答案 1 :(得分:1)

您需要先安装gfortran

sudo apt-get install gfortran