Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 无法在macOS上安装sklearn_Python_Scikit Learn_Scipy - Fatal编程技术网

Python 无法在macOS上安装sklearn

Python 无法在macOS上安装sklearn,python,scikit-learn,scipy,Python,Scikit Learn,Scipy,您好,我尝试在macOS上安装sklearn,但遇到一个错误: error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE_VENDOR_BLAS=1 -Iscipy/sparse/linalg/dsolve/SuperLU/SRC -I/private/v

您好,我尝试在macOS上安装sklearn,但遇到一个错误:

error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DUSE_VENDOR_BLAS=1 -Iscipy/sparse/linalg/dsolve/SuperLU/SRC -I/private/var/folders/8x/7jm2njhs7wb7vny_wchsj_q80000gn/T/pip-build-env-95_yvt7g/overlay/lib/python3.9/site-packages/numpy/core/include -c scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.c -o build/temp.macosx-10.9-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o -MMD -MF build/temp.macosx-10.9-x86_64-3.9/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon2.o.d" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

我正在使用python 3.9和pip 20.2.4。

根据您的错误,scipy中存在一些问题

  • 解决方案

    • 尝试删除Scipy,然后重新安装Scipy
  • 参考资料