使用valgrind制作python后导入和安装numpy时出错

时间:2018-07-13 19:15:41

标签: python linux numpy pip valgrind

我正在共享Linux机器上工作,我想用valgrind制作我的本地python(3.5.5)以跟踪内存泄漏。在我构建valgrind之前,numpy可以正常工作,但之后则不能。 我从源代码本地构建了valgrind,将CPATH设置为.... / valgrind / include目录,然后使用命令“ ./configure --prefix = / home / rishi_gurnani / localpy --enable-shared --without配置了python -pymalloc --with-pydebug --with-valgrind”,然后执行“ make && make install”。

然后在导入numpy时出现以下错误“ Numpy构建失败,无法导入多数组”。

为了解决这个问题,我删除了.... / python3.5 / site-packages / numpy /和.... / python3.5 / site-packages / numpy-1.10.4.dist-info /目录,然后尝试“ pip3 install numpy”,并遇到以下错误消息:

    Collecting numpy
  Using cached https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip
/home/rishi_gurnani/localpy/lib/python3.5/site-packages/pip/req/req_install.py:439: ResourceWarning: unclosed file <_io.BufferedReader name=5>
  command_desc='python setup.py egg_info')
Building wheels for collected packages: numpy
  Running setup.py bdist_wheel for numpy ... error
  Complete output from command /home/rishi_gurnani/localpy/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d9kjbec2/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp3s78f2xkpip-wheel- --python-tag cp35:
  Running from numpy source directory.
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/lib', '/usr/lib64', '/usr/lib']
    NOT AVAILABLE

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

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

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
    libraries tatlas not found in ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
    NOT AVAILABLE

  /tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py:624: 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()
  blas_info:
  customize UnixCCompiler
  customize UnixCCompiler
  C compiler: gcc -fno-strict-aliasing -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -O0 -Wall -Wstrict-prototypes -fPIC

  creating /tmp/tmpbmhvmm5i/tmp
  creating /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i
  compile options: '-I/usr/local/include -I/opt/include -I/usr/include -I/home/rishi_gurnani/localpy/include -c'
  gcc: /tmp/tmpbmhvmm5i/source.c
  /tmp/tmpbmhvmm5i/source.c:1:19: warning: cblas.h: No such file or directory
  /tmp/tmpbmhvmm5i/source.c: In function ‘main’:
  /tmp/tmpbmhvmm5i/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
  /tmp/tmpbmhvmm5i/source.c:7:10: warning: no newline at end of file
  gcc /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lcblas -o /tmp/tmpbmhvmm5i/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 /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lblas -o /tmp/tmpbmhvmm5i/a.out
  /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o: In function `main':
  /tmp/tmpbmhvmm5i/source.c:6: undefined reference to `cblas_ddot'
  collect2: ld returned 1 exit status
  /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o: In function `main':
  /tmp/tmpbmhvmm5i/source.c:6: undefined reference to `cblas_ddot'
  collect2: ld returned 1 exit status
  Traceback (most recent call last):
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 196, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
      m = lambda self, *args, **kw: func(self, *args, **kw)
    File "/tmp/pip-build-d9kjbec2/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 /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lcblas -o /tmp/tmpbmhvmm5i/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-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1777, in has_cblas
      extra_postargs=info.get('extra_link_args', []))
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
      debug, extra_preargs, extra_postargs, None, target_lang)
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 198, in link
      raise LinkError(msg)
  distutils.errors.LinkError: Command "gcc /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lcblas -o /tmp/tmpbmhvmm5i/a.out" failed with exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 196, in link
      self.spawn(linker + ld_args)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
      m = lambda self, *args, **kw: func(self, *args, **kw)
    File "/tmp/pip-build-d9kjbec2/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 /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lblas -o /tmp/tmpbmhvmm5i/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-d9kjbec2/numpy/setup.py", line 394, in <module>
      setup_package()
    File "/tmp/pip-build-d9kjbec2/numpy/setup.py", line 386, in setup_package
      setup(**metadata)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/core.py", line 135, in setup
      config = configuration()
    File "/tmp/pip-build-d9kjbec2/numpy/setup.py", line 166, in configuration
      config.add_subpackage('numpy')
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 1024, in add_subpackage
      caller_level = 2)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 993, in get_subpackage
      caller_level = caller_level + 1)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 930, 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-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 1024, in add_subpackage
      caller_level = 2)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 993, in get_subpackage
      caller_level = caller_level + 1)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 930, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
    File "numpy/core/setup.py", line 839, in configuration
      blas_info = get_info('blas_opt', 0)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 432, in get_info
      return cl().get_info(notfound_action)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 624, in get_info
      self.calc_info()
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1704, in calc_info
      blas_info = get_info('blas')
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 432, in get_info
      return cl().get_info(notfound_action)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 624, in get_info
      self.calc_info()
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1740, in calc_info
      lib = self.has_cblas(info)
    File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1783, in has_cblas
      extra_postargs=info.get('extra_link_args', []))
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
      debug, extra_preargs, extra_postargs, None, target_lang)
    File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 198, in link
      raise LinkError(msg)
  distutils.errors.LinkError: Command "gcc /tmp/tmpbmhvmm5i/tmp/tmpbmhvmm5i/source.o -L/usr/lib64 -lblas -o /tmp/tmpbmhvmm5i/a.out" failed with exit status 1

  ----------------------------------------
  Failed building wheel for numpy
/home/rishi_gurnani/localpy/lib/python3.5/site-packages/pip/wheel.py:726: ResourceWarning: unclosed file <_io.BufferedReader name=5>
  return False
  Running setup.py clean for numpy
  Complete output from command /home/rishi_gurnani/localpy/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d9kjbec2/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
  Running from numpy source directory.

  `setup.py clean` is not supported, use one of the following instead:

    - `git clean -xdf` (cleans all files)
    - `git clean -Xdf` (cleans all versioned files, doesn't touch
                        files that aren't checked into the git repo)

  Add `--force` to your command to use it anyway if you must (unsupported).


  ----------------------------------------
  Failed cleaning build dir for numpy
/home/rishi_gurnani/localpy/lib/python3.5/site-packages/pip/wheel.py:738: ResourceWarning: unclosed file <_io.BufferedReader name=5>
  return False
Failed to build numpy
Installing collected packages: numpy
  Running setup.py install for numpy ... error
    Complete output from command /home/rishi_gurnani/localpy/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d9kjbec2/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6udpzey9-record/install-record.txt --single-version-externally-managed --compile:
    Running from numpy source directory.

    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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/lib', '/usr/lib64', '/usr/lib']
      NOT AVAILABLE

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

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

    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries tatlas not found in ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/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 ['/home/rishi_gurnani/localpy/lib', '/usr/local/lib64', '/usr/local/lib', '/opt/lib64', '/opt/lib', '/usr/lib64/atlas', '/usr/lib64/sse2', '/usr/lib64', '/usr/lib/sse2', '/usr/lib']
      NOT AVAILABLE

    /tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py:624: 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()
    blas_info:
    customize UnixCCompiler
    customize UnixCCompiler
    C compiler: gcc -fno-strict-aliasing -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -O0 -Wall -Wstrict-prototypes -fPIC

    creating /tmp/tmpnk3fp8t1/tmp
    creating /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1
    compile options: '-I/usr/local/include -I/opt/include -I/usr/include -I/home/rishi_gurnani/localpy/include -c'
    gcc: /tmp/tmpnk3fp8t1/source.c
    /tmp/tmpnk3fp8t1/source.c:1:19: warning: cblas.h: No such file or directory
    /tmp/tmpnk3fp8t1/source.c: In function ‘main’:
    /tmp/tmpnk3fp8t1/source.c:6: warning: implicit declaration of function ‘cblas_ddot’
    /tmp/tmpnk3fp8t1/source.c:7:10: warning: no newline at end of file
    gcc /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lcblas -o /tmp/tmpnk3fp8t1/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 /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lblas -o /tmp/tmpnk3fp8t1/a.out
    /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o: In function `main':
    /tmp/tmpnk3fp8t1/source.c:6: undefined reference to `cblas_ddot'
    collect2: ld returned 1 exit status
    /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o: In function `main':
    /tmp/tmpnk3fp8t1/source.c:6: undefined reference to `cblas_ddot'
    collect2: ld returned 1 exit status
    Traceback (most recent call last):
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 196, in link
        self.spawn(linker + ld_args)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
        m = lambda self, *args, **kw: func(self, *args, **kw)
      File "/tmp/pip-build-d9kjbec2/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 /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lcblas -o /tmp/tmpnk3fp8t1/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-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1777, in has_cblas
        extra_postargs=info.get('extra_link_args', []))
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
        debug, extra_preargs, extra_postargs, None, target_lang)
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 198, in link
        raise LinkError(msg)
    distutils.errors.LinkError: Command "gcc /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lcblas -o /tmp/tmpnk3fp8t1/a.out" failed with exit status 1

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 196, in link
        self.spawn(linker + ld_args)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/ccompiler.py", line 89, in <lambda>
        m = lambda self, *args, **kw: func(self, *args, **kw)
      File "/tmp/pip-build-d9kjbec2/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 /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lblas -o /tmp/tmpnk3fp8t1/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-d9kjbec2/numpy/setup.py", line 394, in <module>
        setup_package()
      File "/tmp/pip-build-d9kjbec2/numpy/setup.py", line 386, in setup_package
        setup(**metadata)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/tmp/pip-build-d9kjbec2/numpy/setup.py", line 166, in configuration
        config.add_subpackage('numpy')
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 1024, in add_subpackage
        caller_level = 2)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 993, in get_subpackage
        caller_level = caller_level + 1)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 930, 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-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 1024, in add_subpackage
        caller_level = 2)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 993, in get_subpackage
        caller_level = caller_level + 1)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/misc_util.py", line 930, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "numpy/core/setup.py", line 839, in configuration
        blas_info = get_info('blas_opt', 0)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 432, in get_info
        return cl().get_info(notfound_action)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 624, in get_info
        self.calc_info()
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1704, in calc_info
        blas_info = get_info('blas')
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 432, in get_info
        return cl().get_info(notfound_action)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 624, in get_info
        self.calc_info()
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1740, in calc_info
        lib = self.has_cblas(info)
      File "/tmp/pip-build-d9kjbec2/numpy/numpy/distutils/system_info.py", line 1783, in has_cblas
        extra_postargs=info.get('extra_link_args', []))
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/ccompiler.py", line 734, in link_executable
        debug, extra_preargs, extra_postargs, None, target_lang)
      File "/home/rishi_gurnani/localpy/lib/python3.5/distutils/unixccompiler.py", line 198, in link
        raise LinkError(msg)
    distutils.errors.LinkError: Command "gcc /tmp/tmpnk3fp8t1/tmp/tmpnk3fp8t1/source.o -L/usr/lib64 -lblas -o /tmp/tmpnk3fp8t1/a.out" failed with exit status 1

    ----------------------------------------
Command "/home/rishi_gurnani/localpy/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-d9kjbec2/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6udpzey9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-d9kjbec2/numpy/
/home/rishi_gurnani/localpy/lib/python3.5/site-packages/pip/basecommand.py:229: ResourceWarning: unclosed file <_io.BufferedReader name=5>
  return ERROR

编辑: 我在目录“ / usr / lib64”中找到了地图集,并将ATLAS环境变量设置为指向该目录和“ / usr / lib64 / atlas /”,但是“ pip3 install numpy”仍然失败。 “ / usr / lib64 / atlas /”中的文件如下:

  

libatlas.so.3 libclapack.so.3 liblapack.so.3 libptf77blas.so.3   libatlas.so.3.0 libclapack.so.3.0 liblapack.so.3.0
  libptf77blas.so.3.0 libcblas.so.3 libf77blas.so.3 libptcblas.so.3   libcblas.so.3.0 libf77blas.so.3.0 libptcblas.so.3.0

有什么办法解决这个问题吗?

0 个答案:

没有答案
相关问题