无法在AIX6.1上构建和安装NumPy

时间:2018-11-21 07:47:59

标签: python numpy gfortran aix openblas

我正在尝试在AIX6.1(Unix操作系统之一)上安装Data Science软件包。 我尝试使用PIP,但未正确构建和安装它,某些.so文件未正确编译,之后我尝试从无法正确构建它的源进行安装。 我安装了GCC 6.3版,Fortran编译器。 给出命令:

    # python setup.py build

该命令执行错误。请在错误日志下方找到。

    gcc: /tmp/tmpn4o642va/source.c
    /tmp/tmpn4o642va/source.c:1:19: fatal error: cblas.h: No such file or directory
     #include <cblas.h>
               ^
    compilation terminated.
    /tmp/tmpn4o642va/source.c:1:19: fatal error: cblas.h: No such file or directory
     #include <cblas.h>
               ^
    compilation terminated.

整个日志中间出现一些错误:

    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/usr/bin/../../opt/freeware/lib', '/opt/lib', '/usr/lib64', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
    .
    .
    .
    /opt/freeware/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    building library "npymath" sources
    get_default_fcompiler: matching types: '['ibm', 'gnu', 'gnu95']'
    customize IBMFCompiler
    Could not locate executable xlf90
    Could not locate executable xlf
    customize GnuFCompiler
    Could not locate executable g77
    Could not locate executable f77
    customize Gnu95FCompiler
    Found executable /usr/bin/gfortran
    customize Gnu95FCompiler
    customize Gnu95FCompiler using config

在整个日志的最后,错误是:

    compiling C sources
    C compiler: /opt/freeware/bin/gcc -maix64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl

    compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_LARGE_FILES -Inumpy/core/include -Ibuild/src.aix-6.1-3.6/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/freeware/include/python3.6m -Ibuild/src.aix-6.1-3.6/numpy/core/src/private -Ibuild/src.aix-6.1-3.6/numpy/core/src/npymath -Ibuild/src.aix-6.1-3.6/numpy/core/src/private -Ibuild/src.aix-6.1-3.6/numpy/core/src/npymath -Ibuild/src.aix-6.1-3.6/numpy/core/src/private -Ibuild/src.aix-6.1-3.6/numpy/core/src/npymath -c'
    /opt/freeware/lib/python3.6/config-3.6m/ld_so_aix /opt/freeware/bin/gcc -maix64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pthread -bI:/opt/freeware/lib/python3.6/config-3.6m/python.exp -L. -L/usr/lib/threads -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib64 -L/usr/lib -L. -L/usr/lib/threads -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib64 -L/usr/lib build/temp.aix-6.1-3.6/numpy/core/src/dummymodule.o -L/opt/freeware/lib64 -Lbuild/temp.aix-6.1-3.6 -lm -o build/lib.aix-6.1-3.6/numpy/core/_dummy.so
    ld: 0711-738 ERROR: Input file build/temp.aix-6.1-3.6/numpy/core/src/dummymodule.o:
            XCOFF32 object files are not allowed in 64-bit mode.
    collect2: error: ld returned 8 exit status
    ld: 0711-738 ERROR: Input file build/temp.aix-6.1-3.6/numpy/core/src/dummymodule.o:
            XCOFF32 object files are not allowed in 64-bit mode.
    collect2: error: ld returned 8 exit status
    error: Command "/opt/freeware/lib/python3.6/config-3.6m/ld_so_aix /opt/freeware/bin/gcc -maix64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -pthread -bI:/opt/freeware/lib/python3.6/config-3.6m/python.exp -L. -L/usr/lib/threads -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib64 -L/usr/lib -L. -L/usr/lib/threads -L/opt/freeware/lib64 -L/opt/freeware/lib -L/usr/lib64 -L/usr/lib build/temp.aix-6.1-3.6/numpy/core/src/dummymodule.o -L/opt/freeware/lib64 -Lbuild/temp.aix-6.1-3.6 -lm -o build/lib.aix-6.1-3.6/numpy/core/_dummy.so" failed with exit status 1

非常感谢!

0 个答案:

没有答案