当我尝试运行设置时,从Windows命令提示符出现此错误:
Found executable C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.e
xe
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\core\include -IC:\P
ython27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27
\PC /Tcskimage\exposure\unwrap_2d_ljmu.c /Fobuild\temp.win32-2.7\Release\skimage
\exposure\unwrap_2d_ljmu.obj
unwrap_2d_ljmu.c
skimage\exposure\unwrap_2d_ljmu.c(181) : error C2065: 'M_PI' : undeclared identi
fier
skimage\exposure\unwrap_2d_ljmu.c(182) : error C2065: 'M_PI' : undeclared identi
fier
skimage\exposure\unwrap_2d_ljmu.c(194) : error C2065: 'M_PI' : undeclared identi
fier
skimage\exposure\unwrap_2d_ljmu.c(195) : error C2065: 'M_PI' : undeclared identi
fier
skimage\exposure\unwrap_2d_ljmu.c(621) : error C2065: 'M_PI' : undeclared identi
fier
skimage\exposure\unwrap_2d_ljmu.c(690) : error C2065: 'M_PI' : undeclared identi
fier
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.ex
e /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\lib\site-packages\numpy\cor
e\include -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\inclu
de -IC:\Python27\PC /Tcskimage\exposure\unwrap_2d_ljmu.c /Fobuild\temp.win32-2.7
\Release\skimage\exposure\unwrap_2d_ljmu.obj" failed with exit status 2
有谁知道我可以做些什么来安装scikit?谢谢!
答案 0 :(得分:1)
我是通过pip安装的(也在windows上)并且安装得很好
pip install -U scikit-learn
检查about pip, and installing pip on windows
<强>更新强>
你有所有的依赖吗?在上面的日志中,我看到NumPy但没有SciPy。也许这就是问题所在。
<强>溶液强>
SciKit-Learn“unwrap_2d_ljmu.c”文件搞砸了。
在其中添加_USE_MATH_DEFINES
标识符。
检查undeclared identifier and math constants