Pip 在 Python 3.5 和 2.7 (RHEL) 上的安装速度明显变慢

Pip install significantly slower on Python 3.5 versus 2.7 (RHEL)

我目前是 运行 Red Hat 7.3,并从 SCL (www.softwarecollections.org/en/scls/rhscl/rh-python35/) 安装了 Python 3.5。当我尝试 pip 安装 C 密集型包(如 numpy 和 pandas 时,Python 3.5 上的安装过程比我尝试在本机 Python 上安装相同的包时花费的时间要长得多2.7 安装(每个包 6 分钟,约 10 秒)。

我有一些自动化流程经常构建和重建虚拟环境,因此这对整体性能产生了巨大影响。有谁知道为什么这些安装在 Python 3.5 中花费的时间明显更长?任何帮助将不胜感激。

这是两个版本的 'pip install numpy -v' 片段。显而易见的是,GCC 的构建出现在 3.5 而不是 2.7,但我不确定为什么...

原生 Python 2.7:

  Looking up "https://pypi.python.org/packages/dd/b5/47bd2174dbb14e5fa2dd6ad28fd1d54d38e84d29c1b131a00354ddb0cae0/numpy-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl" in the cache
  Current age based on date: 5291
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 5291
  Using cached numpy-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl
  Downloading from URL https://pypi.python.org/packages/dd/b5/47bd2174dbb14e5fa2dd6ad28fd1d54d38e84d29c1b131a00354ddb0cae0/numpy-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=a0b187652045bfb4c014f24c921c644b (from https://pypi.python.org/simple/numpy/)
Installing collected packages: numpy

Successfully installed numpy-1.13.0
Cleaning up...

SCL Python 3.5:

...
     LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_not_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:675:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar1_not_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:703:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_not_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_less_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:675:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar1_less_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:703:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_less_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_less_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:675:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar1_less_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:703:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_less_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_greater_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:675:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar1_greater_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:703:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_greater_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_greater_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:675:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar1_greater_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:703:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_scalar2_greater_equal_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:727:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 64) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_sqrt_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:753:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:759:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_absolute_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:804:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:810:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_negative_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:804:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:810:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 16) {
             ^
    In file included from numpy/core/src/umath/loops.c.src:39:0:
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_maximum_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:836:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (i + 3 * stride <= n) {
                            ^
    In file included from numpy/core/src/umath/loops.c.src:39:0:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:844:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 32) {
             ^
    In file included from numpy/core/src/umath/loops.c.src:39:0:
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_minimum_DOUBLE’:
    numpy/core/src/umath/simd.inc.src:836:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (i + 3 * stride <= n) {
                            ^
    In file included from numpy/core/src/umath/loops.c.src:39:0:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:844:9: note: in expansion of macro ‘LOOP_BLOCKED’
             LOOP_BLOCKED(@type@, 32) {
             ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_logical_or_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:910:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 16) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_reduce_logical_or_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:942:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(npy_bool, 32) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_binary_logical_and_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:910:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 16) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_reduce_logical_and_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:942:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(npy_bool, 32) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_absolute_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:984:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 16) {
         ^
    numpy/core/src/umath/simd.inc.src: In function ‘sse2_logical_not_BOOL’:
    numpy/core/src/umath/simd.inc.src:107:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(; i < npy_blocked_end(peel, sizeof(type), vsize, n);\
                 ^
    numpy/core/src/umath/simd.inc.src:984:5: note: in expansion of macro ‘LOOP_BLOCKED’
         LOOP_BLOCKED(@type@, 16) {
         ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_FLOAT’:
    numpy/core/src/umath/loops.c.src:1635:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i++) {
                           ^
    numpy/core/src/umath/loops.c.src:1658:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:1676:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i++) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_DOUBLE’:
    numpy/core/src/umath/loops.c.src:1635:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i++) {
                           ^
    numpy/core/src/umath/loops.c.src:1658:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:1676:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i++) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_LONGDOUBLE’:
    numpy/core/src/umath/loops.c.src:1635:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i++) {
                           ^
    numpy/core/src/umath/loops.c.src:1658:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:1676:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i++) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_HALF’:
    numpy/core/src/umath/loops.c.src:1635:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i++) {
                           ^
    numpy/core/src/umath/loops.c.src:1658:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:1676:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i++) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_CFLOAT’:
    numpy/core/src/umath/loops.c.src:2410:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i += 2) {
                           ^
    numpy/core/src/umath/loops.c.src:2434:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:2452:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i+=2) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_CDOUBLE’:
    numpy/core/src/umath/loops.c.src:2410:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i += 2) {
                           ^
    numpy/core/src/umath/loops.c.src:2434:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:2452:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i+=2) {
                      ^
    numpy/core/src/umath/loops.c.src: In function ‘pairwise_sum_CLONGDOUBLE’:
    numpy/core/src/umath/loops.c.src:2410:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 0; i < n; i += 2) {
                           ^
    numpy/core/src/umath/loops.c.src:2434:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (i = 8; i < n - (n % 8); i += 8) {
                           ^
    numpy/core/src/umath/loops.c.src:2452:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (; i < n; i+=2) {
                      ^
    gcc: numpy/core/src/umath/umathmodule.c
    gcc: numpy/core/src/umath/reduction.c
    gcc: numpy/core/src/private/mem_overlap.c
    numpy/core/src/private/mem_overlap.c: In function ‘diophantine_dfs’:
    numpy/core/src/private/mem_overlap.c:420:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     for (j = 0; j < n; ++j) {
                                   ^
    numpy/core/src/private/mem_overlap.c: In function ‘strides_to_terms’:
    numpy/core/src/private/mem_overlap.c:715:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0; i < PyArray_NDIM(arr); ++i) {
                       ^
    numpy/core/src/private/mem_overlap.c: In function ‘solve_may_share_memory’:
    numpy/core/src/private/mem_overlap.c:801:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (rhs != (npy_uintp)rhs) {
                 ^
    numpy/core/src/private/mem_overlap.c: In function ‘solve_may_have_internal_overlap’:
    numpy/core/src/private/mem_overlap.c:890:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (j = 0; j < nterms; ++j) {
                       ^
    numpy/core/src/private/mem_overlap.c:908:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (j = 0; j < nterms; ++j) {
                       ^
    gcc: numpy/core/src/umath/ufunc_type_resolution.c
    gcc: numpy/core/src/umath/ufunc_object.c
    numpy/core/src/umath/ufunc_object.c: In function ‘PyUFunc_GenericReduction’:
    numpy/core/src/umath/ufunc_object.c:3897:15: warning: unused variable ‘out_obj’ [-Wunused-variable]
         PyObject *out_obj = NULL;
                   ^
    gcc: numpy/core/src/private/ufunc_override.c
    gcc -pthread -shared -L/opt/rh/rh-python35/root/usr/lib64-Wl,-z,relro build/temp.linux-x86_64-3.5/numpy/core/src/umath/umathmodule.o build/temp.linux-x86_64-3.5/numpy/core/src/umath/reduction.o build/temp.linux-x86_64-3.5/build/src.linux-x86_64-3.5/numpy/core/src/umath/loops.o build/temp.linux-x86_64-3.5/numpy/core/src/umath/ufunc_object.o build/temp.linux-x86_64-3.5/build/src.linux-x86_64-3.5/numpy/core/src/umath/scalarmath.o build/temp.linux-x86_64-3.5/numpy/core/src/umath/ufunc_type_resolution.o build/temp.linux-x86_64-3.5/numpy/core/src/umath/override.o build/temp.linux-x86_64-3.5/numpy/core/src/private/mem_overlap.o build/temp.linux-x86_64-3.5/numpy/core/src/private/ufunc_override.o -L/opt/rh/rh-python35/root/usr/lib64 -Lbuild/temp.linux-x86_64-3.5 -lnpymath -lm -lpython3.5m -o build/lib.linux-x86_64-3.5/numpy/core/umath.cpython-35m-x86_64-linux-gnu.so
    building 'numpy.core.umath_tests' extension
    compiling C sources
    C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python35/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC

    compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.5/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/rh/rh-python35/root/usr/include/python3.5m -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -c'
    gcc: build/src.linux-x86_64-3.5/numpy/core/src/umath/umath_tests.c
    gcc -pthread -shared -L/opt/rh/rh-python35/root/usr/lib64-Wl,-z,relro build/temp.linux-x86_64-3.5/build/src.linux-x86_64-3.5/numpy/core/src/umath/umath_tests.o -L/opt/rh/rh-python35/root/usr/lib64 -Lbuild/temp.linux-x86_64-3.5 -lpython3.5m -o build/lib.linux-x86_64-3.5/numpy/core/umath_tests.cpython-35m-x86_64-linux-gnu.so
    building 'numpy.core.test_rational' extension
    compiling C sources
    C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python35/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC

    compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-3.5/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/rh/rh-python35/root/usr/include/python3.5m -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -Ibuild/src.linux-x86_64-3.5/numpy/core/src/private -Ibuild/src.linux-x86_64-3.5/numpy/core/src/npymath -c'
    gcc: build/src.linux-x86_64-3.5/numpy/core/src/umath/test_rational.c
    gcc -pthread -shared -L/opt/rh/rh-python35/root/usr/lib64-Wl,-z,relro build/temp.linux-x86_64-3.5/build/src.linux-x86_64-3.5/numpy/core/src/umath/test_rational.o -L/opt/rh/rh-python35/root/usr/lib64 -Lbuild/temp.linux-x86_64-3.5 -lpython3.5m -o build/lib.linux-x86_64-3.5/numpy/core/test_rational.cpython-35m-x86_64-linux-gnu.so
    building 'numpy.core.struct_ufunc_test' extension
    compiling C sources
    C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/rh-python35/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
...
      Removing source in /tmp/pip-build-12s9oqxb/numpy
    Successfully installed numpy-1.13.0
    Cleaning up...

我注意到了相同的行为,但似乎可以通过升级 pip 来解决。

默认情况下,rh-python35 似乎与 pip 7.1.0 一起提供并且 pip 警告 9.0.1 可用。升级到此似乎可以解决 numpy(以及其他具有类似问题的软件包)的问题,现在可以快速安装并具有与 Python 2.7:

类似的日志签名
[confuser@es-node-0 ~]$ python -m venv myenv
[confuser@es-node-0 ~]$ source myvenv/bin/activate
(myvenv) [confuser@es-node-0 ~]$ pip --version
pip 7.1.0 from /home/confuser/virtso/lib64/python3.5/site-packages (python 3.5)
(myvenv) [confuser@es-node-0 ~]$ pip install --upgrade pip
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.1.0
Uninstalling pip-7.1.0:
  Successfully uninstalled pip-7.1.0
Successfully installed pip-9.0.1
(myvenv) [confuser@es-node-0 ~]$ time pip install numpy -v
Collecting numpy
  Using cached numpy-1.13.0-cp35-cp35m-manylinux1_x86_64.whl
Installing collected packages: numpy

.....

Skipping link https://pypi.python.org/packages/ff/9e/54a8f4abbe80db332b4574e67fec52f3018d5f246077c8348bcc9ec79e3e/numpy-1.12.0rc2-cp35-none-win32.whl#md5=320ba3c9eb8c9c83527d12362cb3dced (from https://pypi.python.org/simple/numpy/); it is not compatible with this Python
  Using version 1.13.0 (newest of versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0)
  Looking up "https://pypi.python.org/packages/f0/b9/50edeee58c1bed8db12c636f890547e5de33c12ffc4214cf5531c34ba0b1/numpy-1.13.0-cp35-cp35m-manylinux1_x86_64.whl" in the cache
  Current age based on date: 723
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 723
  Using cached numpy-1.13.0-cp35-cp35m-manylinux1_x86_64.whl
  Downloading from URL https://pypi.python.org/packages/f0/b9/50edeee58c1bed8db12c636f890547e5de33c12ffc4214cf5531c34ba0b1/numpy-1.13.0-cp35-cp35m-manylinux1_x86_64.whl#md5=d6e6af5f3f5b5711501045b63e8281f4 (from https://pypi.python.org/simple/numpy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*)
Installing collected packages: numpy

Successfully installed numpy-1.13.0
Cleaning up...

real    0m2.817s
user    0m2.286s
sys 0m0.384s
(myvenv) [confuser@es-node-0 ~]$