numpy 的构建轮失败 pandas

Failed building wheel for numpy pandas

我在 Centos 上,我正在尝试安装 pandas 但我收到以下错误:

         sudo pip3 install pandas                                                                         ~
Collecting pandas
Requirement already satisfied (use --upgrade to upgrade): python-dateutil>=2.5.0 in /usr/local/lib/python3.5/site-packages (from pandas)
Collecting numpy>=1.9.0 (from pandas)
  Using cached https://files.pythonhosted.org/packages/2d/80/1809de155bad674b494248bcfca0e49eb4c5d8bee58f26fe7a0dd45029e2/numpy-1.15.4.zip
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/local/lib/python3.5/site-packages (from pandas)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in /usr/local/lib/python3.5/site-packages (from python-dateutil>=2.5.0->pandas)
Building wheels for collected packages: numpy
  Running setup.py bdist_wheel for numpy
  Complete output from command /usr/local/bin/python3.5 -c "import setuptools;__file__='/tmp/pip-build-iu_r4bvr/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp6jr137vfpip-wheel-:
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

  blis_info:
  customize UnixCCompiler
    libraries blis not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

  openblas_info:
  customize UnixCCompiler
  customize UnixCCompiler
    libraries openblas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries tatlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  customize UnixCCompiler
    libraries satlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_info:
  customize UnixCCompiler
    libraries f77blas,cblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
    NOT AVAILABLE

  accelerate_info:
    NOT AVAILABLE

  blas_info:
  customize UnixCCompiler
  customize UnixCCompiler
  C compiler: gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

  creating /tmp/tmpt7qb9hvv/tmp
  creating /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv
  compile options: '-I/usr/local/include -I/usr/include -c'
  gcc: /tmp/tmpt7qb9hvv/source.c
  /tmp/tmpt7qb9hvv/source.c:1:19: warning: cblas.h: No such file or directory
  /tmp/tmpt7qb9hvv/source.c: In function ‘main’:
  /tmp/tmpt7qb9hvv/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
  gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lcblas -o /tmp/tmpt7qb9hvv/a.out
  /usr/bin/ld: cannot find -lcblas
  collect2: ld returned 1 exit status
  /usr/bin/ld: cannot find -lcblas
  collect2: ld returned 1 exit status
  gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lblas -o /tmp/tmpt7qb9hvv/a.out
  /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o: In function `main':
  /tmp/tmpt7qb9hvv/source.c:6: undefined reference to `cblas_ddot'
  collect2: ld returned 1 exit status
  /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o: In function `main':
  /tmp/tmpt7qb9hvv/source.c:6: undefined reference to `cblas_ddot'
  collect2: ld returned 1 exit status
  Running from numpy source directory.
  /tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py:625: UserWarning:
      Atlas (http://math-atlas.sourceforge.net/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [atlas]) or by setting
      the ATLAS environment variable.
    self.calc_info()
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 194, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
      m = lambda self, *args, **kw: func(self, *args, **kw)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 152, in CCompiler_spawn
      raise DistutilsExecError('Command "%s" failed with exit status %d%s' % (cmd, s, msg))
  distutils.errors.DistutilsExecError: Command "gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lcblas -o /tmp/tmpt7qb9hvv/a.out" failed with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1722, in has_cblas
      extra_postargs=info.get('extra_link_args', []))
    File "/usr/local/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
      debug, extra_preargs, extra_postargs, None, target_lang)
    File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 196, in link
      raise LinkError(msg)
  distutils.errors.LinkError: Command "gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lcblas -o /tmp/tmpt7qb9hvv/a.out" failed with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 194, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
      m = lambda self, *args, **kw: func(self, *args, **kw)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 152, in CCompiler_spawn
      raise DistutilsExecError('Command "%s" failed with exit status %d%s' % (cmd, s, msg))
  distutils.errors.DistutilsExecError: Command "gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lblas -o /tmp/tmpt7qb9hvv/a.out" failed with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 403, in <module>
      setup_package()
    File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 395, in setup_package
      setup(**metadata)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/core.py", line 135, in setup
      config = configuration()
    File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 167, in configuration
      config.add_subpackage('numpy')
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1037, in add_subpackage
      caller_level = 2)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1006, in get_subpackage
      caller_level = caller_level + 1)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
    File "numpy/setup.py", line 10, in configuration
      config.add_subpackage('core')
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1037, in add_subpackage
      caller_level = 2)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1006, in get_subpackage
      caller_level = caller_level + 1)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
    File "numpy/core/setup.py", line 832, in configuration
      blas_info = get_info('blas_opt', 0)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 433, in get_info
      return cl().get_info(notfound_action)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 625, in get_info
      self.calc_info()
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1649, in calc_info
      blas_info = get_info('blas')
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 433, in get_info
      return cl().get_info(notfound_action)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 625, in get_info
      self.calc_info()
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1685, in calc_info
      lib = self.has_cblas(info)
    File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1728, in has_cblas
      extra_postargs=info.get('extra_link_args', []))
    File "/usr/local/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
      debug, extra_preargs, extra_postargs, None, target_lang)
    File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 196, in link
      raise LinkError(msg)
  distutils.errors.LinkError: Command "gcc -pthread /tmp/tmpt7qb9hvv/tmp/tmpt7qb9hvv/source.o -L/usr/lib64 -lblas -o /tmp/tmpt7qb9hvv/a.out" failed with exit status 1

  ----------------------------------------
  Failed building wheel for numpy
Failed to build numpy
Installing collected packages: numpy, pandas
  Running setup.py install for numpy
    Complete output from command /usr/local/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-iu_r4bvr/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-w3kiv6ws-record/install-record.txt --single-version-externally-managed --compile:

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install numpy`   (last NumPy release on PyPi)


    blas_opt_info:
    blas_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE

    blis_info:
    customize UnixCCompiler
      libraries blis not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE

    openblas_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE

    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries tatlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
      NOT AVAILABLE

    atlas_3_10_blas_info:
    customize UnixCCompiler
      libraries satlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
      NOT AVAILABLE

    atlas_blas_info:
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
      NOT AVAILABLE

    accelerate_info:
      NOT AVAILABLE

    blas_info:
    customize UnixCCompiler
    customize UnixCCompiler
    C compiler: gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

    creating /tmp/tmpr0p6x74m/tmp
    creating /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m
    compile options: '-I/usr/local/include -I/usr/include -c'
    gcc: /tmp/tmpr0p6x74m/source.c
    /tmp/tmpr0p6x74m/source.c:1:19: warning: cblas.h: No such file or directory
    /tmp/tmpr0p6x74m/source.c: In function ‘main’:
    /tmp/tmpr0p6x74m/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
    gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lcblas -o /tmp/tmpr0p6x74m/a.out
    /usr/bin/ld: cannot find -lcblas
    collect2: ld returned 1 exit status
    /usr/bin/ld: cannot find -lcblas
    collect2: ld returned 1 exit status
    gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lblas -o /tmp/tmpr0p6x74m/a.out
    /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o: In function `main':
    /tmp/tmpr0p6x74m/source.c:6: undefined reference to `cblas_ddot'
    collect2: ld returned 1 exit status
    /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o: In function `main':
    /tmp/tmpr0p6x74m/source.c:6: undefined reference to `cblas_ddot'
    collect2: ld returned 1 exit status
    Running from numpy source directory.
    /tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py:625: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 194, in link
        self.spawn(linker + ld_args)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
        m = lambda self, *args, **kw: func(self, *args, **kw)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 152, in CCompiler_spawn
        raise DistutilsExecError('Command "%s" failed with exit status %d%s' % (cmd, s, msg))
    distutils.errors.DistutilsExecError: Command "gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lcblas -o /tmp/tmpr0p6x74m/a.out" failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1722, in has_cblas
        extra_postargs=info.get('extra_link_args', []))
      File "/usr/local/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
        debug, extra_preargs, extra_postargs, None, target_lang)
      File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 196, in link
        raise LinkError(msg)
    distutils.errors.LinkError: Command "gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lcblas -o /tmp/tmpr0p6x74m/a.out" failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 194, in link
        self.spawn(linker + ld_args)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
        m = lambda self, *args, **kw: func(self, *args, **kw)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/ccompiler.py", line 152, in CCompiler_spawn
        raise DistutilsExecError('Command "%s" failed with exit status %d%s' % (cmd, s, msg))
    distutils.errors.DistutilsExecError: Command "gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lblas -o /tmp/tmpr0p6x74m/a.out" failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 403, in <module>
        setup_package()
      File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 395, in setup_package
        setup(**metadata)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/tmp/pip-build-iu_r4bvr/numpy/setup.py", line 167, in configuration
        config.add_subpackage('numpy')
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1037, in add_subpackage
        caller_level = 2)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1006, in get_subpackage
        caller_level = caller_level + 1)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "numpy/setup.py", line 10, in configuration
        config.add_subpackage('core')
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1037, in add_subpackage
        caller_level = 2)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 1006, in get_subpackage
        caller_level = caller_level + 1)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/misc_util.py", line 943, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "numpy/core/setup.py", line 832, in configuration
        blas_info = get_info('blas_opt', 0)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 433, in get_info
        return cl().get_info(notfound_action)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 625, in get_info
        self.calc_info()
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1649, in calc_info
        blas_info = get_info('blas')
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 433, in get_info
        return cl().get_info(notfound_action)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 625, in get_info
        self.calc_info()
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1685, in calc_info
        lib = self.has_cblas(info)
      File "/tmp/pip-build-iu_r4bvr/numpy/numpy/distutils/system_info.py", line 1728, in has_cblas
        extra_postargs=info.get('extra_link_args', []))
      File "/usr/local/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
        debug, extra_preargs, extra_postargs, None, target_lang)
      File "/usr/local/lib/python3.5/distutils/unixccompiler.py", line 196, in link
        raise LinkError(msg)
    distutils.errors.LinkError: Command "gcc -pthread /tmp/tmpr0p6x74m/tmp/tmpr0p6x74m/source.o -L/usr/lib64 -lblas -o /tmp/tmpr0p6x74m/a.out" failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python3.5 -c "import setuptools, tokenize;__file__='/tmp/pip-build-iu_r4bvr/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-w3kiv6ws-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-iu_r4bvr/numpy

谁能帮我安装这个??我的最终目标是能够安装 pandas.

如果我没猜错的话,我猜你想为 python 安装 numpy 模块。为此,您只需键入

sudo yum install numpy scipy

尝试安装 cblas 开发文件。在基于 Debian 的发行版上,它是 libopenblas-dev。