0

From the windows command prompt when I try to run the set up I get this error:

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

Does anyone know what I can do to get the scikit installed? Thanks!

Angel Cloudwalker
  • 2,015
  • 5
  • 32
  • 54
  • Are you missing a prerequisite python module? Like numPy for example, that is required for install? – Aidan Jan 15 '14 at 03:06
  • No, previously I was missing Cython module, which it alerted me to and I installed it. When I opened the file that raises the error (unwrap_2d_ljmu.cs) in VS 2012 the corresponding lines refer to a variable M_PI that it seems to have a problem w/. I'm going to try pip tonight, and also see if I can alter that C# file code safely. My last resort will be to uninstall VS 2012. Something is leading me to believe the declaration in that file is outdated and my VS 2012 doesn't like it. – Angel Cloudwalker Jan 15 '14 at 14:06
  • 1
    Could you try to add the following to unwrap_2d_ljmu.c, just before the ``#include `` line? ``#define _USE_MATH_DEFINES`` If that works, then we can update the source accordingly. – Stefan van der Walt Jan 15 '14 at 14:54
  • Would you mind filing a pull-request so that this also fixes the problem for others? Thanks! – Stefan van der Walt Jan 29 '14 at 23:43

1 Answers1

1

I installed it by pip (also on windows) and it installed fine

pip install -U scikit-learn


check about pip, and installing pip on windows

update
Do you have all dependencies ? In log above i see NumPy but no SciPy. Maybe that's the problem.

solution
SciKit-Learn "unwrap_2d_ljmu.c" file is messed up.
Add _USE_MATH_DEFINES identifier in it.

check undeclared identifier and math constants

Community
  • 1
  • 1
michalczukm
  • 9,963
  • 6
  • 40
  • 47