当我运行时:
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?有没有比其他 Pandas 形象更好的形象?
谢谢!
最佳答案
需要构建工具
确保安装 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 和 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
关于linux - 在 Amazon EC2 Linux 服务器上安装 pandas 的步骤是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20011544/