找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 1611|回复: 1

[求助] pypy3 -m pip install sklearn 出错,MAC下,谢谢

1

主题

4

帖子

4

积分

贫民

积分
4
太积极 发表于 2019-9-18 19:15:15 | 显示全部楼层 |阅读模式
$ pypy3 -m pip install sklearn
Collecting sklearn
Collecting scikit-learn (from sklearn)
......
  Building wheel for scipy (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/pypy3 /usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/tmpn6kd9u1d
       cwd: /private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scipy
  Complete output (742 lines):
  lapack_opt_info:
  lapack_mkl_info:
    libraries mkl_rt not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  openblas_lapack_info:
    libraries openblas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  system_info:
    NOT AVAILABLE
  
  atlas_3_10_threads_info:
......
           ^~~~~~~~~
  1 error generated.
  /var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/tmp8m8tikwt/source.c:1:10: fatal error: 'cblas.h' file not found
  #include <cblas.h>
           ^~~~~~~~~
  1 error generated.
    FOUND:
      libraries = ['blas', 'blas']
      library_dirs = ['/usr/lib']
      include_dirs = ['/usr/local/include', '/usr/include', '/usr/local/Cellar/pypy3/7.1.1_1/libexec/include']
  
    FOUND:
      define_macros = [('NO_ATLAS_INFO', 1)]
      libraries = ['lapack', 'lapack', 'blas', 'blas']
      library_dirs = ['/usr/lib']
      language = f77
      include_dirs = ['/usr/local/include', '/usr/include', '/usr/local/Cellar/pypy3/7.1.1_1/libexec/include']
  
  Splitting linalg.interpolative Fortran source files
  blas_opt_info:
  blas_mkl_info:
    libraries mkl_rt not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  blis_info:
    libraries blis not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  openblas_info:
    libraries openblas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries tatlas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  atlas_3_10_blas_info:
    libraries satlas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
  atlas_blas_info:
    libraries f77blas,cblas,atlas not found in ['/usr/local/Cellar/pypy3/7.1.1_1/libexec/lib', '/usr/local/lib', '/usr/lib']
    NOT AVAILABLE
  
    FOUND:
      define_macros = [('NO_ATLAS_INFO', 1)]
      libraries = ['blas', 'blas']
      library_dirs = ['/usr/lib']
      include_dirs = ['/usr/local/include', '/usr/include', '/usr/local/Cellar/pypy3/7.1.1_1/libexec/include']
  
......
  error: library dfftpack has Fortran sources but no Fortran compiler found
  ----------------------------------------
  ERROR: Failed building wheel for scipy
  Running setup.py clean for scipy
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scipy/setup.py'"'"'; __file__='"'"'/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
       cwd: /private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scipy
  Complete output (11 lines):
  /usr/local/Cellar/pypy3/7.1.1_1/libexec/lib-python/3/importlib/_bootstrap.py:206: UserWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872, got 416
    return f(*args, **kwds)
  
  `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).
  
  ----------------------------------------
  ERROR: Failed cleaning build dir for scipy
Failed to build scipy
Building wheels for collected packages: scikit-learn
  Building wheel for scikit-learn (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/pypy3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/setup.py'"'"'; __file__='"'"'/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/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 /private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-wheel-9lv6z6fz --python-tag pp371
       cwd: /private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/
  Complete output (28 lines):
  Partial import of sklearn during the build process.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/setup.py", line 290, in <module>
      setup_package()
    File "/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/setup.py", line 286, in setup_package
      setup(**metadata)
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/core.py", line 137, in setup
      config = configuration()
    File "/private/var/folders/sp/vz74h1tx3jlb3jqrq__bjwh00000gp/T/pip-install-lxpsdrrm/scikit-learn/setup.py", line 174, in configuration
      config.add_subpackage('sklearn')
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
      caller_level = 2)
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
      caller_level = caller_level + 1)
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
    File "sklearn/setup.py", line 62, in configuration
      config.add_subpackage('utils')
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 1035, in add_subpackage
      caller_level = 2)
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 1004, in get_subpackage
      caller_level = caller_level + 1)
    File "/usr/local/Cellar/pypy3/7.1.1_1/libexec/site-packages/numpy/distutils/misc_util.py", line 941, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
    File "sklearn/utils/setup.py", line 8, in configuration
      from Cython import Tempita
  ModuleNotFoundError: No module named 'Cython'
  ----------------------------------------
  ERROR: Failed building wheel for scikit-learn
  Running setup.py clean for scikit-learn
Failed to build scikit-learn
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

怎么办?谢谢


回复

使用道具 举报

1

主题

4

帖子

4

积分

贫民

积分
4
太积极  楼主| 发表于 2019-9-18 19:23:19 | 显示全部楼层
$ pypy3
Python 3.6.1 (784b254d669919c872a505b807db8462b6140973, Sep 04 2019, 12:29:41)
[PyPy 7.1.1-beta0 with GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy development: the art of
waiting''
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表