Discussion:
Error while building Scikit-learn in Windows (32-bit)
(too old to reply)
Maheshakya Wijewardena
2013-07-11 12:27:54 UTC
Permalink
Hi,
I've installed all dependencies for Scikit learn. But when I run
python setup.py build
command I get the following error.

c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe:
build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address
0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared
build\temp.win32-.7\Release\sklearn\ensemble\_gradient_boosting.o
-LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o
build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1

What is this? How do I get around this?
Please help.
Lars Buitinck
2013-07-11 13:30:00 UTC
Permalink
Post by Maheshakya Wijewardena
build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address
0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared
build\temp.win32-.7\Release\sklearn\ensemble\_gradient_boosting.o
-LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o
build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1
What is this? How do I get around this?
Looks like this problem: http://stackoverflow.com/q/16623407/166749.
Do you have Intel MKL, and if so, could you try building without it.
(The suggestion at SO to use OpenBLAS won't work; that doesn't work
well with Python's multiprocessing.)
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
Maheshakya Wijewardena
2013-07-11 14:17:45 UTC
Permalink
I do not have MKL.
Can there be any other reason for this to happen?
I'm stuck with this.
Post by Maheshakya Wijewardena
Post by Maheshakya Wijewardena
build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc
address
Post by Maheshakya Wijewardena
0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared
build\temp.win32-.7\Release\sklearn\ensemble\_gradient_boosting.o
-LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o
build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1
What is this? How do I get around this?
Looks like this problem: http://stackoverflow.com/q/16623407/166749.
Do you have Intel MKL, and if so, could you try building without it.
(The suggestion at SO to use OpenBLAS won't work; that doesn't work
well with Python's multiprocessing.)
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Vlad Niculae
2013-07-11 14:23:19 UTC
Permalink
If you have MSVC from C++ express 2008 available could you try with that?

Are you trying to build the latest master, does the last release work well?

Vlad

On Thu, Jul 11, 2013 at 5:17 PM, Maheshakya Wijewardena
Post by Maheshakya Wijewardena
I do not have MKL.
Can there be any other reason for this to happen?
I'm stuck with this.
Post by Lars Buitinck
Post by Maheshakya Wijewardena
build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address
0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared
build\temp.win32-.7\Release\sklearn\ensemble\_gradient_boosting.o
-LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o
build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1
What is this? How do I get around this?
Looks like this problem: http://stackoverflow.com/q/16623407/166749.
Do you have Intel MKL, and if so, could you try building without it.
(The suggestion at SO to use OpenBLAS won't work; that doesn't work
well with Python's multiprocessing.)
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Maheshakya Wijewardena
2013-07-11 14:29:24 UTC
Permalink
I tried with MSVC. It gives me this error

No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Unable to find vcvarsall.bat

Yes, It's the latest master. So are you suggesting that the latest release
is still buggy?
Post by Vlad Niculae
If you have MSVC from C++ express 2008 available could you try with that?
Are you trying to build the latest master, does the last release work well?
Vlad
On Thu, Jul 11, 2013 at 5:17 PM, Maheshakya Wijewardena
Post by Maheshakya Wijewardena
I do not have MKL.
Can there be any other reason for this to happen?
I'm stuck with this.
Post by Lars Buitinck
Post by Maheshakya Wijewardena
build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address
0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared
build\temp.win32-.7\Release\sklearn\ensemble\_gradient_boosting.o
-LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o
build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1
What is this? How do I get around this?
Looks like this problem: http://stackoverflow.com/q/16623407/166749.
Do you have Intel MKL, and if so, could you try building without it.
(The suggestion at SO to use OpenBLAS won't work; that doesn't work
well with Python's multiprocessing.)
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
------------------------------------------------------------------------------
Post by Maheshakya Wijewardena
Post by Lars Buitinck
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
Post by Maheshakya Wijewardena
Post by Lars Buitinck
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Post by Maheshakya Wijewardena
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
Post by Maheshakya Wijewardena
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Andreas Mueller
2013-07-22 09:08:53 UTC
Permalink
Post by Maheshakya Wijewardena
I tried with MSVC. It gives me this error
No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Unable to find vcvarsall.bat
Yes, It's the latest master. So are you suggesting that the latest
release is still buggy?
I think Vlad suggested you try the last release instead of current
master, to see if that builds.
Vlad Niculae
2013-07-22 09:14:55 UTC
Permalink
The "unable to find vcvarsall.bat" error is because you don't have
environment variables set appropriately. Click Start>Programs>Visual
Studio C++ Express > Visual Studio Command Prompt and run the setup
from there.

Vlad

On Mon, Jul 22, 2013 at 11:08 AM, Andreas Mueller
Post by Andreas Mueller
Post by Maheshakya Wijewardena
I tried with MSVC. It gives me this error
No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Unable to find vcvarsall.bat
Yes, It's the latest master. So are you suggesting that the latest
release is still buggy?
I think Vlad suggested you try the last release instead of current
master, to see if that builds.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Maheshakya Wijewardena
2013-07-22 11:15:25 UTC
Permalink
last release also doesn't work. It gives the same error.
The problem might be the unavailability of blas implementation in Windows
as I figured out.
Numpy doesn't have settings for blas.
In Linux versions we need to get dependencies for blas (libatlas-dev)
before builiding. But in Windows it's not there.
Post by Vlad Niculae
The "unable to find vcvarsall.bat" error is because you don't have
environment variables set appropriately. Click Start>Programs>Visual
Studio C++ Express > Visual Studio Command Prompt and run the setup
from there.
Vlad
On Mon, Jul 22, 2013 at 11:08 AM, Andreas Mueller
Post by Andreas Mueller
Post by Maheshakya Wijewardena
I tried with MSVC. It gives me this error
No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Unable to find vcvarsall.bat
Yes, It's the latest master. So are you suggesting that the latest
release is still buggy?
I think Vlad suggested you try the last release instead of current
master, to see if that builds.
------------------------------------------------------------------------------
Post by Andreas Mueller
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
Post by Andreas Mueller
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Vlad Niculae
2013-07-22 12:25:26 UTC
Permalink
Please also try with MSVC using the way I mentioned. Either way it's
still strange; back when I was using windows I could build with mingw.

Yours,
Vlad

On Mon, Jul 22, 2013 at 1:15 PM, Maheshakya Wijewardena
Post by Maheshakya Wijewardena
last release also doesn't work. It gives the same error.
The problem might be the unavailability of blas implementation in Windows as
I figured out.
Numpy doesn't have settings for blas.
In Linux versions we need to get dependencies for blas (libatlas-dev) before
builiding. But in Windows it's not there.
Post by Vlad Niculae
The "unable to find vcvarsall.bat" error is because you don't have
environment variables set appropriately. Click Start>Programs>Visual
Studio C++ Express > Visual Studio Command Prompt and run the setup
from there.
Vlad
On Mon, Jul 22, 2013 at 11:08 AM, Andreas Mueller
Post by Andreas Mueller
Post by Maheshakya Wijewardena
I tried with MSVC. It gives me this error
No module named msvccompiler in numpy.distutils; trying from distutils
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Unable to find vcvarsall.bat
Yes, It's the latest master. So are you suggesting that the latest
release is still buggy?
I think Vlad suggested you try the last release instead of current
master, to see if that builds.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
Continue reading on narkive:
Loading...