当我尝试运行设置时,从Windows命令提示符出现此错误:
Found executable C:Program Files (x86)Microsoft Visual Studio 11.0VCBINcl.e
xe
C:Program Files (x86)Microsoft Visual Studio 11.0VCBINcl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -IC:Python27libsite-packagesnumpycoreinclude -IC:P
ython27libsite-packagesnumpycoreinclude -IC:Python27include -IC:Python27
PC /Tcskimageexposureunwrap_2d_ljmu.c /Fobuildtemp.win32-2.7Releaseskimage
exposureunwrap_2d_ljmu.obj
unwrap_2d_ljmu.c
skimageexposureunwrap_2d_ljmu.c(181) : error C2065: 'M_PI' : undeclared identi
fier
skimageexposureunwrap_2d_ljmu.c(182) : error C2065: 'M_PI' : undeclared identi
fier
skimageexposureunwrap_2d_ljmu.c(194) : error C2065: 'M_PI' : undeclared identi
fier
skimageexposureunwrap_2d_ljmu.c(195) : error C2065: 'M_PI' : undeclared identi
fier
skimageexposureunwrap_2d_ljmu.c(621) : error C2065: 'M_PI' : undeclared identi
fier
skimageexposureunwrap_2d_ljmu.c(690) : error C2065: 'M_PI' : undeclared identi
fier
error: Command "C:Program Files (x86)Microsoft Visual Studio 11.0VCBINcl.ex
e /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:Python27libsite-packagesnumpycor
einclude -IC:Python27libsite-packagesnumpycoreinclude -IC:Python27inclu
de -IC:Python27PC /Tcskimageexposureunwrap_2d_ljmu.c /Fobuildtemp.win32-2.7
Releaseskimageexposureunwrap_2d_ljmu.obj" failed with exit status 2
有谁知道我能做些什么来安装scikit?谢谢!
我通过pip(也在Windows上)安装了它,它安装得很好
pip install -U scikit-learn
检查关于 PIP,并在 Windows 上安装 PIP
更新
你有所有的依赖项吗?在上面的日志中,我看到了NumPy,但没有SciPy。也许这就是问题所在。
溶液
SciKit-Learn"unwrap_2d_ljmu.c"文件搞砸了。
在其中添加_USE_MATH_DEFINES
标识符。
检查未声明的标识符和数学常量