PyPy3 安装 numpy 失败

PyPy3 安装 numpy 失败

基本上当我打电话的时候pypy3 -m pip install numpy --user我会遇到这个可爱的烂摊子:

    Traceback (most recent call last):
  File "/opt/pypy3/lib-python/3/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/pypy3/lib-python/3/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/__main__.py", line 16, in <module>
    from pip._internal import main as _main  # noqa
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/index.py", line 25, in <module>
    from pip._internal.download import HAS_TLS, is_url, path_to_url, url_to_path
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/download.py", line 40, in <module>
    from pip._internal.utils.logging import indent_log
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/utils/logging.py", line 9, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_internal/utils/misc.py", line 21, in <module>
    from pip._vendor import pkg_resources
  File "/home/r392781/.local/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 35, in <module>
    import plistlib
  File "/opt/pypy3/lib-python/3/plistlib.py", line 279, in <module>
    _dateParser = re.compile(r"(?P<year>\d\d\d\d)(?:-(?P<month>\d\d)(?:-(?P<day>\d\d)(?:T(?P<hour>\d\d)(?::(?P<minute>\d\d)(?::(?P<second>\d\d))?)?)?)?)?Z", re.ASCII)
  File "/opt/pypy3/lib-python/3/re.py", line 224, in compile
    return _compile(pattern, flags)
  File "/opt/pypy3/lib-python/3/re.py", line 293, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/opt/pypy3/lib-python/3/sre_compile.py", line 540, in compile
    p = sre_parse.parse(p, flags)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 829, in parse
    p = _parse_sub(source, pattern, 0)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 778, in _parse
    p = _parse_sub(source, state)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 778, in _parse
    p = _parse_sub(source, state)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 778, in _parse
    p = _parse_sub(source, state)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 437, in _parse_sub
    itemsappend(_parse(source, state))
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 493, in _parse
    subpattern = SubPattern(state)
  File "/opt/pypy3/lib-python/3/sre_parse.py", line 107, in __init__
    if data is None:
KeyboardInterrupt
r392781@MR-THINKPAD:~$ pypy3 -m pip install numpy --user
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip (4.9MB)
    100% |████████████████████████████████| 4.9MB 759kB/s
Building wheels for collected packages: numpy
  Running setup.py bdist_wheel for numpy ... error
  Complete output from command /usr/local/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8pnw1818/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/pip-wheel-rtmpcqec --python-tag pp360:
  Running from numpy source directory.
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmp0gbyfpzs/tmp
  creating /tmp/tmp0gbyfpzs/tmp/tmp0gbyfpzs
  compile options: '-MMD -MF /tmp/tmp0gbyfpzs/file.c.d -c'
  cc: /tmp/tmp0gbyfpzs/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  blis_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpm97xxqid/tmp
  creating /tmp/tmpm97xxqid/tmp/tmpm97xxqid
  compile options: '-MMD -MF /tmp/tmpm97xxqid/file.c.d -c'
  cc: /tmp/tmpm97xxqid/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries blis not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  openblas_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpiygihrzk/tmp
  creating /tmp/tmpiygihrzk/tmp/tmpiygihrzk
  compile options: '-MMD -MF /tmp/tmpiygihrzk/file.c.d -c'
  cc: /tmp/tmpiygihrzk/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmp2g2vb_08/tmp
  creating /tmp/tmp2g2vb_08/tmp/tmp2g2vb_08
  compile options: '-MMD -MF /tmp/tmp2g2vb_08/file.c.d -c'
  cc: /tmp/tmp2g2vb_08/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries openblas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpc5m71stl/tmp
  creating /tmp/tmpc5m71stl/tmp/tmpc5m71stl
  compile options: '-MMD -MF /tmp/tmpc5m71stl/file.c.d -c'
  cc: /tmp/tmpc5m71stl/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpr8whjs6j/tmp
  creating /tmp/tmpr8whjs6j/tmp/tmpr8whjs6j
  compile options: '-MMD -MF /tmp/tmpr8whjs6j/file.c.d -c'
  cc: /tmp/tmpr8whjs6j/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries satlas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpsew73n13/tmp
  creating /tmp/tmpsew73n13/tmp/tmpsew73n13
  compile options: '-MMD -MF /tmp/tmpsew73n13/file.c.d -c'
  cc: /tmp/tmpsew73n13/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_blas_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmponl3vq9x/tmp
  creating /tmp/tmponl3vq9x/tmp/tmponl3vq9x
  compile options: '-MMD -MF /tmp/tmponl3vq9x/file.c.d -c'
  cc: /tmp/tmponl3vq9x/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  /tmp/pip-install-8pnw1818/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
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpqq8njrpu/tmp
  creating /tmp/tmpqq8njrpu/tmp/tmpqq8njrpu
  compile options: '-MMD -MF /tmp/tmpqq8njrpu/file.c.d -c'
  cc: /tmp/tmpqq8njrpu/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries blas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  /tmp/pip-install-8pnw1818/numpy/numpy/distutils/system_info.py:624: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    self.calc_info()
  blas_src_info:
    NOT AVAILABLE

  /tmp/pip-install-8pnw1818/numpy/numpy/distutils/system_info.py:624: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  /bin/sh: 1: svnversion: not found
  non-existing path in 'numpy/distutils': 'site.cfg'
  /bin/sh: 1: svnversion: not found
  F2PY Version 2
  lapack_opt_info:
  lapack_mkl_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpao6u0_98/tmp
  creating /tmp/tmpao6u0_98/tmp/tmpao6u0_98
  compile options: '-MMD -MF /tmp/tmpao6u0_98/file.c.d -c'
  cc: /tmp/tmpao6u0_98/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  openblas_lapack_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpllk7ue4z/tmp
  creating /tmp/tmpllk7ue4z/tmp/tmpllk7ue4z
  compile options: '-MMD -MF /tmp/tmpllk7ue4z/file.c.d -c'
  cc: /tmp/tmpllk7ue4z/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmps_1ll0gt/tmp
  creating /tmp/tmps_1ll0gt/tmp/tmps_1ll0gt
  compile options: '-MMD -MF /tmp/tmps_1ll0gt/file.c.d -c'
  cc: /tmp/tmps_1ll0gt/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries openblas not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  openblas_clapack_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpnnkq0tlb/tmp
  creating /tmp/tmpnnkq0tlb/tmp/tmpnnkq0tlb
  compile options: '-MMD -MF /tmp/tmpnnkq0tlb/file.c.d -c'
  cc: /tmp/tmpnnkq0tlb/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpugdovrgj/tmp
  creating /tmp/tmpugdovrgj/tmp/tmpugdovrgj
  compile options: '-MMD -MF /tmp/tmpugdovrgj/file.c.d -c'
  cc: /tmp/tmpugdovrgj/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpvl4m18ve/tmp
  creating /tmp/tmpvl4m18ve/tmp/tmpvl4m18ve
  compile options: '-MMD -MF /tmp/tmpvl4m18ve/file.c.d -c'
  cc: /tmp/tmpvl4m18ve/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries tatlas,tatlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpifoz6px6/tmp
  creating /tmp/tmpifoz6px6/tmp/tmpifoz6px6
  compile options: '-MMD -MF /tmp/tmpifoz6px6/file.c.d -c'
  cc: /tmp/tmpifoz6px6/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpt29izu7f/tmp
  creating /tmp/tmpt29izu7f/tmp/tmpt29izu7f
  compile options: '-MMD -MF /tmp/tmpt29izu7f/file.c.d -c'
  cc: /tmp/tmpt29izu7f/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries tatlas,tatlas not found in /usr/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmptui2ez7i/tmp
  creating /tmp/tmptui2ez7i/tmp/tmptui2ez7i
  compile options: '-MMD -MF /tmp/tmptui2ez7i/file.c.d -c'
  cc: /tmp/tmptui2ez7i/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmprbn706th/tmp
  creating /tmp/tmprbn706th/tmp/tmprbn706th
  compile options: '-MMD -MF /tmp/tmprbn706th/file.c.d -c'
  cc: /tmp/tmprbn706th/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries satlas,satlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpf6r0h1jq/tmp
  creating /tmp/tmpf6r0h1jq/tmp/tmpf6r0h1jq
  compile options: '-MMD -MF /tmp/tmpf6r0h1jq/file.c.d -c'
  cc: /tmp/tmpf6r0h1jq/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmp0tlhim9z/tmp
  creating /tmp/tmp0tlhim9z/tmp/tmp0tlhim9z
  compile options: '-MMD -MF /tmp/tmp0tlhim9z/file.c.d -c'
  cc: /tmp/tmp0tlhim9z/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries satlas,satlas not found in /usr/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpntp75rgc/tmp
  creating /tmp/tmpntp75rgc/tmp/tmpntp75rgc
  compile options: '-MMD -MF /tmp/tmpntp75rgc/file.c.d -c'
  cc: /tmp/tmpntp75rgc/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmphc0j0o1q/tmp
  creating /tmp/tmphc0j0o1q/tmp/tmphc0j0o1q
  compile options: '-MMD -MF /tmp/tmphc0j0o1q/file.c.d -c'
  cc: /tmp/tmphc0j0o1q/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmp120uasnp/tmp
  creating /tmp/tmp120uasnp/tmp/tmp120uasnp
  compile options: '-MMD -MF /tmp/tmp120uasnp/file.c.d -c'
  cc: /tmp/tmp120uasnp/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmp7b07czgg/tmp
  creating /tmp/tmp7b07czgg/tmp/tmp7b07czgg
  compile options: '-MMD -MF /tmp/tmp7b07czgg/file.c.d -c'
  cc: /tmp/tmp7b07czgg/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpjzsp10js/tmp
  creating /tmp/tmpjzsp10js/tmp/tmpjzsp10js
  compile options: '-MMD -MF /tmp/tmpjzsp10js/file.c.d -c'
  cc: /tmp/tmpjzsp10js/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpny_lxu2u/tmp
  creating /tmp/tmpny_lxu2u/tmp/tmpny_lxu2u
  compile options: '-MMD -MF /tmp/tmpny_lxu2u/file.c.d -c'
  cc: /tmp/tmpny_lxu2u/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries f77blas,cblas,atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpatv6_y4u/tmp
  creating /tmp/tmpatv6_y4u/tmp/tmpatv6_y4u
  compile options: '-MMD -MF /tmp/tmpatv6_y4u/file.c.d -c'
  cc: /tmp/tmpatv6_y4u/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/local/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmprargolyu/tmp
  creating /tmp/tmprargolyu/tmp/tmprargolyu
  compile options: '-MMD -MF /tmp/tmprargolyu/file.c.d -c'
  cc: /tmp/tmprargolyu/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries f77blas,cblas,atlas not found in /usr/lib
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmpcdlgt0ti/tmp
  creating /tmp/tmpcdlgt0ti/tmp/tmpcdlgt0ti
  compile options: '-MMD -MF /tmp/tmpcdlgt0ti/file.c.d -c'
  cc: /tmp/tmpcdlgt0ti/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack_atlas not found in /usr/lib
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
  customize UnixCCompiler
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  creating /tmp/tmphytscc3u/tmp
  creating /tmp/tmphytscc3u/tmp/tmphytscc3u
  compile options: '-MMD -MF /tmp/tmphytscc3u/file.c.d -c'
  cc: /tmp/tmphytscc3u/file.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
    libraries lapack not found in ['/usr/local/lib', '/usr/lib']
    NOT AVAILABLE

  /tmp/pip-install-8pnw1818/numpy/numpy/distutils/system_info.py:624: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE

  /tmp/pip-install-8pnw1818/numpy/numpy/distutils/system_info.py:624: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  /opt/pypy3/lib-python/3/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  running bdist_wheel
  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
  creating build
  creating build/src.linux-x86_64-3.5
  creating build/src.linux-x86_64-3.5/numpy
  creating build/src.linux-x86_64-3.5/numpy/distutils
  building library "npymath" sources
  get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
  customize Gnu95FCompiler
  Could not locate executable gfortran
  Could not locate executable f95
  customize IntelFCompiler
  Could not locate executable ifort
  Could not locate executable ifc
  customize LaheyFCompiler
  Could not locate executable lf95
  customize PGroupFCompiler
  Could not locate executable pgfortran
  customize AbsoftFCompiler
  Could not locate executable f90
  Could not locate executable f77
  customize NAGFCompiler
  customize VastFCompiler
  customize CompaqFCompiler
  Could not locate executable fort
  customize IntelItaniumFCompiler
  Could not locate executable efort
  Could not locate executable efc
  customize IntelEM64TFCompiler
  customize GnuFCompiler
  Could not locate executable g77
  customize G95FCompiler
  Could not locate executable g95
  customize PathScaleFCompiler
  Could not locate executable pathf95
  customize NAGFORCompiler
  Could not locate executable nagfor
  don't know how to compile Fortran code on platform 'posix'
  C compiler: cc -pthread -DNDEBUG -O2 -fPIC

  compile options: '-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/pypy3/include -c'
  cc: _configtest.c
  /bin/bash: cc: command not found
  /bin/bash: cc: command not found
  failure.
  removing: _configtest.c _configtest.o
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-8pnw1818/numpy/setup.py", line 394, in <module>
      setup_package()
    File "/tmp/pip-install-8pnw1818/numpy/setup.py", line 386, in setup_package
      setup(**metadata)
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/core.py", line 169, in setup
      return old_setup(**new_attr)
    File "/home/r392781/.local/lib/python3.5/site-packages/setuptools/__init__.py", line 131, in setup
      return distutils.core.setup(**attrs)
    File "/opt/pypy3/lib-python/3/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/pypy3/lib-python/3/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/pypy3/lib-python/3/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/r392781/.local/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 202, in run
      self.run_command('build')
    File "/opt/pypy3/lib-python/3/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/pypy3/lib-python/3/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/command/build.py", line 47, in run
      old_build.run(self)
    File "/opt/pypy3/lib-python/3/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/opt/pypy3/lib-python/3/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/pypy3/lib-python/3/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/command/build_src.py", line 148, in run
      self.build_sources()
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
      self.build_library_sources(*libname_info)
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/command/build_src.py", line 294, in build_library_sources
      sources = self.generate_sources(sources, (lib_name, build_info))
    File "/tmp/pip-install-8pnw1818/numpy/numpy/distutils/command/build_src.py", line 377, in generate_sources
      source = func(extension, build_dir)
    File "numpy/core/setup.py", line 675, in get_mathlib_info
      raise RuntimeError("Broken toolchain: cannot link a simple C program")
  RuntimeError: Broken toolchain: cannot link a simple C program

  ----------------------------------------
  Failed building wheel for numpy
  Running setup.py clean for numpy
  Complete output from command /usr/local/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8pnw1818/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
Failed to build numpy
Installing collected packages: numpy
  Running setup.py install for numpy ... error
    Complete output from command /usr/local/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-8pnw1818/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-record-imqs6g4k/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    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
    C compiler: cc -pthread -DNDEBUG -O2 -fPIC

    creating /tmp/tmppm47lllt/tmp
    creating /tmp/tmppm47lllt/tmp/tmppm47lllt
    compile options: '-MMD -MF /tmp/tmppm47lllt/file.c.d -c'
    cc: /tmp/tmppm47lllt/file.c
    /bin/bash: cc: command not found
    /bin/bash: cc: command not found
      libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE

    blis_info:
    customize UnixCCompiler
    C compiler: cc -pthread -DNDEBUG -O2 -fPIC

    creating /tmp/tmp585jjn9u/tmp
    creating /tmp/tmp585jjn9u/tmp/tmp585jjn9u
    compile options: '-MMD -MF /tmp/tmp585jjn9u/file.c.d -c'
    cc: /tmp/tmp585jjn9u/file.c
    /bin/bash: cc: command not found
    /bin/bash: cc: command not found
      libraries blis not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE
    ...
    ...

我无法粘贴所有内容,因为它太长了

无论如何,我拥有最新版本的 PyPy 6.0.0 和最新版本的 pip 10.0.1。我正在运行 Ubuntu 16.04 作为 Windows Subsystem for Linux。

我注意到的一件事是,我运行的 pip 实际上位于 python3.5 中。问题是,我get-pip.py直接使用 PyPy 网站上的文件为 PyPy 安装 pip。

以下是版本信息:

  pypy3 -m pip -V
  pip 10.0.1 from /home/r392781/.local/lib/python3.5/site-packages/pip (python 3.5)

我想我已经尝试过很多不同网站的所有方法,但还是没有用。我有点束手无策了。

python3最后一件事,当使用而不是 时,numpy 安装得很好pypy3

由于这是 Ubuntu Exchange,我不确定这是否相关,但我在 Windows 上安装了 PyPy3 和 pip。在这种情况下,pip 单独安装在 pypy3 目录中,但是当我尝试安装 numpy 时,我遇到了同样严重的错误。

答案1

由于您的问题似乎来自源代码编译,如果您将 numpy 的二进制轮子安装到 PyPy3,则可能不会发生相同的错误

为此,请运行以下命令

pypy3 -m pip install --extra-index https://antocuni.github.io/pypy-wheels/ubuntu cpython numpy

pypy-wheels 是一些软件包的预编译轮子的存储库,例如numpy


边注:

PyPy 有它的NumPy 有自己的分支,名为 NumPyPy目前在 PyPy3 上不受支持。摘自 repo:

目前,NumPyPy 无法与 PyPy3* 配合使用,并且还不完整。您可能会收到警告或 NotImplemented 错误。如果您遇到崩溃或错误结果,请告知我们。

因此建议您安装PyPy2.7目前,它支持 NumPyPy

答案2

http://doc.pypy.org/en/latest/release-pypy3-2.4.0.html它说

NumPy which requires installation of our fork of upstream numpy, available on bitbucket

所以你可以尝试

sudo pypy -m pip install git+https://bitbucket.org/pypy/numpy.git

相关内容