luispedro / milk

MILK: Machine Learning Toolkit
http://www.luispedro.org/software/milk
MIT License
605 stars 146 forks source link

milk build fails saying 'skipping incompatible.....' on windows 7 64 bit anaconda(spyder 2.2.5) Python 2.7.5 64bits, Qt 4.8.4, PySide 1.2.1 #17

Closed rkkarpuram closed 10 years ago

rkkarpuram commented 10 years ago

I've been trying to install milk on my windows machine [windows 7 64 bit anaconda(spyder 2.2.5) Python 2.7.5 64bits, Qt 4.8.4, PySide 1.2.1]. Spent whole day trying to figure out what is causing this build fail but failed. Below is a trail of the >>>pip install milk log...

at the end it skips many lines of code saying 'skipping incompatible...'. Can someone please help me with a way to get around this to work?

copying milk\unsupervised\gaussianmixture.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\kmeans.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\normalise.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\parzen.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\pca.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\pdist.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\som.py -> build\lib.win-amd64-2.7\milk\unsupervised
copying milk\unsupervised\__init__.py -> build\lib.win-amd64-2.7\milk\unsupervised
creating build\lib.win-amd64-2.7\milk\utils
copying milk\utils\parallel.py -> build\lib.win-amd64-2.7\milk\utils
copying milk\utils\utils.py -> build\lib.win-amd64-2.7\milk\utils
copying milk\utils\__init__.py -> build\lib.win-amd64-2.7\milk\utils
creating build\lib.win-amd64-2.7\milk\wrapper
copying milk\wrapper\wraplibsvm.py -> build\lib.win-amd64-2.7\milk\wrapper
copying milk\wrapper\__init__.py -> build\lib.win-amd64-2.7\milk\wrapper

creating build\lib.win-amd64-2.7\milk\tests\data

copying milk\tests\data\jugparallel_jugfile.py -> build\lib.win-amd64-2.7\milk\tests\data
copying milk\tests\data\jugparallel_kmeans_jugfile.py -> build\lib.win-amd64-2.7\milk\tests\data
copying milk\tests\data\__init__.py -> build\lib.win-amd64-2.7\milk\tests\data

creating build\lib.win-amd64-2.7\milk\unsupervised\nnmf
copying milk\unsupervised\nnmf\hoyer.py -> build\lib.win-amd64-2.7\milk\unsupervised\nnmf
copying milk\unsupervised\nnmf\lee_seung.py -> build\lib.win-amd64-2.7\milk\unsupervised\nnmf
copying milk\unsupervised\nnmf\__init__.py -> build\lib.win-amd64-2.7\milk\unsupervised\nnmf
copying milk\tests\data\regression-2-Dec-2009.pp.gz -> build\lib.win-amd64-2.7\milk\tests\data
copying milk\tests\data\__init__.pyc -> build\lib.win-amd64-2.7\milk\tests\data

running build_ext

Looking for python27.dll

customize Mingw32CCompiler

customize Mingw32CCompiler using build_ext

Looking for python27.dll

customize Mingw32CCompiler

customize Mingw32CCompiler using build_ext

building 'milk.supervised._perceptron' extension

compiling C++ sources

C compiler: g++ -g -DDEBUG -DMS_WIN64 -O0 -Wall

creating build\temp.win-amd64-2.7

creating build\temp.win-amd64-2.7\Release

creating build\temp.win-amd64-2.7\Release\milk

creating build\temp.win-amd64-2.7\Release\milk\supervised

compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION__=0x0900 -Ie:\
programs\Anaconda\lib\site-packages\numpy\core\include -Ie:\programs\Anaconda\in
clude -Ie:\programs\Anaconda\PC -c'

extra options: '-std=c++0x'

g++ -g -DDEBUG -DMS_WIN64 -O0 -Wall -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERS
ION__=0x0900 -Ie:\programs\Anaconda\lib\site-packages\numpy\core\include -Ie:\pr
ograms\Anaconda\include -Ie:\programs\Anaconda\PC -c milk/supervised/_perceptron
.cpp -o build\temp.win-amd64-2.7\Release\milk\supervised\_perceptron.o -std=c++0
x

Found executable e:\programs\Rtools\gcc-4.6.3\bin\g++.exe

g++ -g -shared build\temp.win-amd64-2.7\Release\milk\supervised\_perceptron.o -L
e:\programs\Anaconda\libs -Le:\programs\Anaconda\PCbuild\amd64 -lpython27 -lmsvc
r90 -o build\lib.win-amd64-2.7\milk\supervised\_perceptron.pyd

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs/libp
ython27.a when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs/pyth
on27.lib when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs\libp
ython27.a when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs/libp
ython27.a when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs/pyth
on27.lib when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs\pyth
on27.lib when searching for -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: cannot find -lpython27

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs/libm
svcr90.a when searching for -lmsvcr90

e:/programs/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i
686-w64-mingw32/bin/ld.exe: skipping incompatible e:\programs\Anaconda\libs\libm
svcr90.a when searching for -lmsvcr90

collect2: ld returned 1 exit status

error: Command "g++ -g -shared build\temp.win-amd64-2.7\Release\milk\supervised\
_perceptron.o -Le:\programs\Anaconda\libs -Le:\programs\Anaconda\PCbuild\amd64 -
lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\milk\supervised\_perceptron.pyd"
failed with exit status 1

----------------------------------------
Cleaning up...
Command e:\programs\Anaconda\python.exe -c "import setuptools, tokenize;__file__
='c:\\users\\ramesh\\appdata\\local\\temp\\pip_build_Ramesh\\milk\\setup.py';exe
c(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n')
, __file__, 'exec'))" install --record c:\users\ramesh\appdata\local\temp\pip-6g
mee8-record\install-record.txt --single-version-externally-managed --compile fai
led with error code 1 in c:\users\ramesh\appdata\local\temp\pip_build_Ramesh\mil
k
Storing debug log for failure in C:\Users\Ramesh\pip\pip.log

E:\Programs\Anaconda>
rkkarpuram commented 10 years ago

Managed to resolve and install milk by commenting out the following lines in file [npy_deprecated_api.h] plus making sure the g++ used is from anaconda scripts and not of Rtools as above.

#define _WARN___LOC__ __FILE__ "("_WARN___STR1__(__LINE__)") : Warning Msg: "
#pragma message(_WARN___LOC__"Using deprecated NumPy API, disable it by " \
                            "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
luispedro commented 10 years ago

Thank you for the report, glad you solved it.