Compile C++ package in WinPython

666 views
Skip to first unread message

QCode

unread,
Aug 21, 2016, 5:36:33 AM8/21/16
to WinPython
Hello,

I got C++ compiltation issues in WinPython when building dev version of scikit-learn.
My questions are:

 1) Default compiler seems gcc, how can I swtich to Vstudio ?

  2) Anybidy has experienced to compilte scikit learn in Winpython 64bits ? 


Thanks; am on this since 3 days and could not find anything on the web....

Herer, my errors

I follow the instructions here:
to compile  Scikit-learn for development

https://github.com/scikit-learn/scikit-learn/issues/5709

1) Download from Git into a repository scikit_learn
2) Add the path to Python Path
3) In IPython 
!!python D:\_devs\Python01\scikit_learn\sklearn\setup.py build_ext --inplace

and I got this message:

Assuming default configuration (scikit_learn\\sklearn\\svm\\tests/{setup_tests,setup}.py was not found)D:\\\\_devs\\\\Python01\\\\scikit_learn\\\\sklearn\\\\setup.py:71: UserWarning: ',
 '    Blas (http://www.netlib.org/blas/) libraries not found.',
 '    Directories to search for the libraries can be specified in the',
 '    numpy/distutils/site.cfg file (section [blas]) or by setting',
 '    the BLAS environment variable.',
 '  warnings.warn(BlasNotFoundError.__doc__)',
 'Warning: Assuming default configuration (scikit_learn\\sklearn\\linear_model\\tests/{setup_tests,setup}.py was not found)Warning: Assuming default configuration (scikit_learn\\sklearn\\utils\\sparsetools\\tests/{setup_tests,setup}.py was not found)Warning: Assuming default configuration (scikit_learn\\sklearn\\utils\\tests/{setup_tests,setup}.py was not found)Warning: Assuming default configuration (scikit_learn\\sklearn\\tests/{setup_tests,setup}.py was not found)gcc.exe: error: _check_build.c: No such file or directory',
 'gcc.exe: fatal error: no input files',
 'compilation terminated.',
 'error: Command "gcc -m64 -g -DNDEBUG -DMS_WIN64 -O2 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x0900 -ID:\\_devs\\Python01\\WinPython-64-2710\\python-2.7.10.amd64\\lib\\site-packages\\numpy\\core\\include -ID:\\_devs\\Python01\\WinPython-64-2710\\python-2.7.10.amd64\\lib\\site-packages\\numpy\\core\\include -ID:\\_devs\\Python01\\WinPython-64-2710\\python-2.7.10.amd64\\include -ID:\\_devs\\Python01\\WinPython-64-2710\\python-2.7.10.amd64\\PC -c _check_build.c -o build\\temp.win-amd64-2.7\\Release\\_check_build.o" failed with exit status 1']
 

Environnment
WinPython 2.7 64bits
Windows-7-6.1.7601-SP1
('Python', '2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)]')
('NumPy', '1.9.2')
('SciPy', '0.16.0' )


Just wondering if possible to get a place where we can compile without spending hours and days on the web
to find the issues ?


Thanks
Brook


stonebig

unread,
Aug 22, 2016, 9:57:45 AM8/22/16
to WinPython

carlkl

unread,
Aug 22, 2016, 3:27:44 PM8/22/16
to WinPython
The error message is quite clear: You have to ensure, that a external blas libary can be found by the installation process.

You may try:

https://bitbucket.org/carlkl/mingw-w64-for-python/downloads/OpenBLAS-0.2.17_win32.7z (32 bit)
https://bitbucket.org/carlkl/mingw-w64-for-python/downloads/OpenBLAS-0.2.17_amd64.7z (64 bit)

you will also need to adapt site.cfg to something like that:

[openblas]
libraries = openblas_serial
library_dirs = C:/PATH_TO/lib
include_dirs = C:/PATH_TO/include


adapt C:/PATH_TO to your extraction folder. libraries = openblas_serial will use the single threaded implementation of BLAS/Lapack of this distribution. Concurrent calculations in sklearn will be performed by joblib or multiprocessing.

Carl
Reply all
Reply to author
Forward
0 new messages