2017-10-11 48 views
0

与pip安装grpcio-reflection需要很长时间。pypi/pip块下载grpcio反射

这很奇怪,因为ppi软件包在PyPI中只有8KB,但下载时间超过一分钟,而其他以兆字节为单位的软件包却非常快速地下载。

更新: 这不是下载,有很多汇编正在进行。这似乎是此功能仍处于alpha所以包未预编译像标准grpcio

UPDATE2:再现步骤

我刚刚开了一个问题在这里:https://github.com/grpc/grpc/issues/12992和我在这里复制的再现步骤进行完成。

似乎取决于其它包在同一个命令行

这可以通过这两个搬运工不同的容器很容易地复制该grpci反射软件包安装冻结:

Dockerfile.fast - 集装箱创建时间〜 1米23S

#Download base ubuntu image 
FROM ubuntu:16.04 
RUN apt-get update && \ 
    apt-get -y install ca-certificates curl 

# Prepare pip 
RUN apt-get -y install python-pip 
RUN pip install -U pip 
RUN pip install grpcio grpcio-tools 
RUN pip install grpcio-reflection   # Two lines is FAST 

Dockerfile.slow - 集装箱创建时间5米20S

#Download base ubuntu image 
FROM ubuntu:16.04 
RUN apt-get update && \ 
    apt-get -y install ca-certificates curl 

# Prepare pip 
RUN apt-get -y install python-pip 
RUN pip install -U pip 
RUN pip install grpcio grpcio-tools grpcio-reflection # Single line is SLOW 

时序容器的建造时间:

time docker build --rm --no-cache -f Dockerfile.fast -t repro_reflbug_fast:latest . 
...... 
real 1m22.295s 
user 0m0.060s 
sys  0m0.040s 

time docker build --rm --no-cache -f Dockerfile.slow -t repro_reflbug_slow:latest . 
..... 
real 6m28.290s 
user 0m0.052s 
sys  0m0.052s 
..... 

我没有时间尚未进行调查,但很长一段时间的情况下,第二块,而第一个犯规。

+0

下载似乎是速度快,但在安装后似乎放慢下来几乎停顿。我没看过为什么(还)。也许有一些依赖关系的问题 - 软件包列出了'cython'和'protobuf'作为依赖关系。 – phd

+0

你在哪个平台上工作?用什么版本的'PIP'?你是否正在使用虚拟环境(建议这么做),如果是这样,使用什么版本的'virtualenv'? 'grpcio-reflection'是纯Python的(所以你可以单独安装'grpcio'和'protobuf'),安装时不应该进行任何编译。 –

+1

@NathanielManistaAtGoogle Hi纳撒尼尔,感谢您的关注。我已经更新了这个问题,添加了repro步骤,并在github中创建了一张票。让我知道你是否需要更多细节。 – purpletentacle

回答