尝试执行easy_install或泊坞窗生成点说没有find命令

我正在尝试build立一个基于amazonlinux的docker容器,它是一些centos。

我需要的一个软件包是主pipe,它在官方仓库上不可用,所以我必须用easy_install或pip来完成。

问题是,虽然我尝试安装python-setuptools和python-pip,然后当我尝试做:

RUN easy_install supervisor 

要么

 RUN pip install supervisor 

它说这个命令不存在

 /bin/sh: easy_install: command not found The command '/bin/sh -c easy_install supervisor' returned a non-zero code: 127 

我尝试了完整的path,但是结果相同,而且我看到其他dockerfiles人像在centos映像上那样做。

过了一会,我find了原因。

默认情况下,yum是安装python26,easy_install脚本是用python27运行的,所以我必须调用easy_install-2.6或者安装python27软件包

不熟悉AWS的特定映像,但是对于一般的centos映像,首先需要用yum命令安装pip或easy_install,这需要epel存储库:

 RUN yum -y install epel-release \ && yum -y install python-pip python-setuptools \ && yum clean all 

Python在他们的页面上详细logging了这个过程: https : //packaging.python.org/install_requirements_linux/

还有一些关于超级用户的文档: https : //superuser.com/q/877759/587488