在ubuntu 12.04 docker镜像上安装pip3

我正试图在Docker镜像上安装和安装pip3。 使用的初始configuration是

FROM ubuntu:12.04 MAINTAINER Candidate @ Ctx <candidate@caltex.com.au> LABEL "name"="Troubleshooting Test" USER root ENV PY_DIR /home/dev

关于这个我参考了一些post( https://askubuntu.com/questions/412178/how-to-install-pip-for-python-3-in-ubuntu-12-04-lts )后,我下面的步骤:

 RUN apt-get update && apt-get install -y \ software-properties-common python-software-properties RUN add-apt-repository ppa:fkrull/deadsnakes RUN apt-get update && apt-get install -y \ python3 \ build-essential \ python3-setuptools \ python-dev RUN easy_install3 pip 

输出是突然的,包含:

 File "build/bdist.linux-x86_64/egg/pip/_vendor/progress/spinner.py", line 32 phases = [u'\u25f7', u'\u25f6', u'\u25f5', u'\u25f4'] ^ SyntaxError: invalid syntax 

另外,当我使用pip3它也有类似的问题。 我试图用命令安装它: apt-get install python3-pip

但是这也不起作用。 请提出解决scheme。

你的问题是你正试图在不支持的python版本上安装最新版本的pip。 可用的版本是

版本:0.2,0.2.1,0.3,0.3.1,0.4,0.5,0.5.1,0.6,0.6.1,0.6.2,0.6.3,0.7,0.7.1,0.7.2,0.8,0.8。 1,0.8.2,0.8.3,1.0,1.0.1,1.0.2,1.1,1.2,1.2.1,1.3,1.3.1,1.4,1.4.1,1.5,1.5.1,1.5.2, 1.5.3,1.5.4,1.5.5,1.5.6,6.0,6.0.1,6.0.2,6.0.3,6.0.4,6.0.5,6.0.6,6.0.7,6.0.8, 6.1.0,6.1.0,6.1.1,7.0.0,7.0.1,7.0.2,7.0.3,7.1.0,7.1.1,7.1.2,8.0.0,8.0.1,8.0.2,8.0。 3,8.1.0,8.1.1,8.1.2,9.0.0,9.0.1

解决scheme是使用工程的版本

 RUN easy_install3 pip==7.1.2 

8.0.0您可能会看到您现在面临的问题