无法在apple m1上通过Pycharm和cli安装软件包scikitlearn

2024-09-30 20:21:55 发布

您现在位置:Python中文网/ 问答频道 /正文

当它启动时,它会写入:

Using cached scikit-learn-0.23.0.tar.gz (7.2 MB)
Installing build dependencies ... -

然后它挂起一个小时并写入此日志(无法完全包含日志)

ERROR: Failed building wheel for scipy
Running setup.py clean for scipy
ERROR: Command errored out with exit status 1:

ERROR: Failed cleaning build dir for scipy
Failed to build numpy scipy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly

atlas_info:
      libraries lapack_atlas not found in /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
      libraries f77blas,cblas,atlas not found in /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
      libraries lapack_atlas not found in /usr/local/lib
      libraries f77blas,cblas,atlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries f77blas,cblas,atlas not found in /usr/lib
      libraries lapack_atlas not found in /opt/local/lib
      libraries f77blas,cblas,atlas not found in /opt/local/lib
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries lapack_atlas not found in /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
      libraries tatlas,tatlas not found in /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib
      libraries lapack_atlas not found in /usr/local/lib
      libraries tatlas,tatlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries tatlas,tatlas not found in /usr/lib
      libraries lapack_atlas not found in /opt/local/lib
      libraries tatlas,tatlas not found in /opt/local/lib
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

File "/private/var/folders/xg/45g_0kp96gj_11cftvnq919r0000gn/T/pip-install-1jwea3es/scikit-learn_dc15d18c3d214b0682eae44ae71e0d21/sklearn/_build_utils/__init__.py", line 35, in _check_cython_version
        raise ModuleNotFoundError(message)
    ModuleNotFoundError: Please install Cython with a version >= 0.28.5 in order to build a scikit-learn from source.

我还通过brew安装了scipy,但没有任何帮助


Tags: inbuildinfolibrarieslibusrlocalnot