maciejkula / glove-python

Toy Python implementation of http://www-nlp.stanford.edu/projects/glove/
Apache License 2.0
1.25k stars 319 forks source link

unable to install glove-python on windows 7 #59

Open vibhutibindal opened 7 years ago

vibhutibindal commented 7 years ago

when i am trying to install glove_python on windows 7 i am getting this error.

C:\Users\BINVI01>pip install glove_python Collecting glove_python Using cached glove_python-0.1.0.tar.gz Requirement already satisfied: numpy in c:\python27\lib\site-packages (from glov e_python) Requirement already satisfied: scipy in c:\python27\lib\site-packages (from glov e_python) Installing collected packages: glove-python Running setup.py install for glove-python ... error Complete output from command c:\python27\python.exe -u -c "import setuptools , tokenize;file='c:\users\binvi01\appdata\local\temp\pip-build-_lfd7z\ \glove-python\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read ().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" instal l --record c:\users\binvi01\appdata\local\temp\pip-sozxqa-record\install-record. txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\glove copying glove\corpus.py -> build\lib.win32-2.7\glove copying glove\glove.py -> build\lib.win32-2.7\glove copying glove__init__.py -> build\lib.win32-2.7\glove running build_ext building 'glove.glove_cython' extension creating build\temp.win32-2.7 creating build\temp.win32-2.7\Release creating build\temp.win32-2.7\Release\glove C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcglove/glove_cython.c /Fobuild\temp.win32-2.7\Release\glove/g love_cython.obj -fopenmp -ffast-math -march=native cl : Command line warning D9002 : ignoring unknown option '-fopenmp' cl : Command line warning D9002 : ignoring unknown option '-ffast-math' cl : Command line warning D9002 : ignoring unknown option '-march=native' glove_cython.c C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth on\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\python27\libs /L IBPATH:c:\python27\PCbuild /LIBPATH:c:\python27\PC\VS9.0 /EXPORT:initglove_cytho n build\temp.win32-2.7\Release\glove/glove_cython.obj /OUT:build\lib.win32-2.7\g love\glove_cython.pyd /IMPLIB:build\temp.win32-2.7\Release\glove\glove_cython.li b /MANIFESTFILE:build\temp.win32-2.7\Release\glove\glove_cython.pyd.manifest -fo penmp LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored Creating library build\temp.win32-2.7\Release\glove\glove_cython.lib and object build\temp.win32-2.7\Release\glove\glove_cython.exp building 'glove.metrics.accuracy_cython' extension creating build\temp.win32-2.7\Release\glove\metrics C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth on\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcglove/metrics/accuracy_cython.c /Fobuild\temp.win32-2.7\Rele ase\glove/metrics/accuracy_cython.obj -fopenmp -ffast-math -march=native cl : Command line warning D9002 : ignoring unknown option '-fopenmp' cl : Command line warning D9002 : ignoring unknown option '-ffast-math' cl : Command line warning D9002 : ignoring unknown option '-march=native' accuracy_cython.c creating build\lib.win32-2.7\glove\metrics C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth on\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\python27\libs /L IBPATH:c:\python27\PCbuild /LIBPATH:c:\python27\PC\VS9.0 /EXPORT:initaccuracy_cy thon build\temp.win32-2.7\Release\glove/metrics/accuracy_cython.obj /OUT:build\l ib.win32-2.7\glove\metrics\accuracy_cython.pyd /IMPLIB:build\temp.win32-2.7\Rele ase\glove/metrics\accuracy_cython.lib /MANIFESTFILE:build\temp.win32-2.7\Release \glove/metrics\accuracy_cython.pyd.manifest -fopenmp LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored Creating library build\temp.win32-2.7\Release\glove/metrics\accuracy_cyth on.lib and object build\temp.win32-2.7\Release\glove/metrics\accuracy_cython.exp

building 'glove.corpus_cython' extension
C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth

on\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tpglove/corpus_cython.cpp /Fobuild\temp.win32-2.7\Release\glov e/corpus_cython.obj -fopenmp -ffast-math -march=native cl : Command line warning D9002 : ignoring unknown option '-fopenmp' cl : Command line warning D9002 : ignoring unknown option '-ffast-math' cl : Command line warning D9002 : ignoring unknown option '-march=native' corpus_cython.cpp C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth on\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc glove/corpus_cython.cpp(1894) : warning C4018: '>=' : signed/unsigned mismat ch glove/corpus_cython.cpp(2225) : warning C4018: '<' : signed/unsigned mismatc h glove/corpus_cython.cpp(2496) : warning C4018: '<' : signed/unsigned mismatc h glove/corpus_cython.cpp(3403) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data glove/corpus_cython.cpp(3431) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data C:\Users\BINVI01\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth on\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:c:\python27\libs /L IBPATH:c:\python27\PCbuild /LIBPATH:c:\python27\PC\VS9.0 stdc++.lib /EXPORT:init corpus_cython build\temp.win32-2.7\Release\glove/corpus_cython.obj /OUT:build\li b.win32-2.7\glove\corpus_cython.pyd /IMPLIB:build\temp.win32-2.7\Release\glove\c orpus_cython.lib /MANIFESTFILE:build\temp.win32-2.7\Release\glove\corpus_cython. pyd.manifest -fopenmp -ffast-math -march=native LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored LINK : warning LNK4044: unrecognized option '/ffast-math'; ignored LINK : warning LNK4044: unrecognized option '/march=native'; ignored LINK : fatal error LNK1181: cannot open input file 'stdc++.lib' error: command 'C:\Users\BINVI01\AppData\Local\Programs\Common\Micros oft\Visual C++ for Python\9.0\VC\Bin\link.exe' failed with exit status 1181

----------------------------------------

Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\ \users\binvi01\appdata\local\temp\pip-build-_lfd7z\glove-python\setup.py' ;f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n') ;f.close();exec(compile(code, file, 'exec'))" install --record c:\users\binv i01\appdata\local\temp\pip-sozxqa-record\install-record.txt --single-version-ext ernally-managed --compile" failed with error code 1 in c:\users\binvi01\appdata\ local\temp\pip-build-_lfd7z\glove-python\

prabhakar9885 commented 7 years ago

@vibhutibindal Were you able to install it ?

IronFarm commented 6 years ago

@vibhutibindal does this wiki guide I wrote help? https://github.com/maciejkula/glove-python/wiki/Installation-on-Windows

shaked571 commented 5 years ago

@IronFarm I tried to follow the above but ended up with this:

writing build\temp.win32-3.6\Release\glove\glove_cython.cp36-win32.def
C:\mingw64\bin\gcc.exe -shared -s build\temp.win32-3.6\Release\glove\glove_cython.o build\temp.win32-3.6\Release\glove\glove_cython.cp36-win32.def "-LC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs" "-LC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\PCbuild\win32" -lpython36 -lmsvcr140 -o build\lib.win32-3.6\glove\glove_cython.cp36-win32.pyd -fopenmp
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs/libpython36.dll.a when searching for -lpython36
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs/python36.lib when searching for -lpython36
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs/libpython36.dll.a when searching for -lpython36
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs/python36.lib when searching for -lpython36
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_86\libs\python36.lib when searching for -lpython36
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython36
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\mingw64\\bin\\gcc.exe' failed with exit status 1

Any suggestion?

IronFarm commented 5 years ago

@shaked571 It looks like you're running a 64-bit version of MinGW64 on a 32-bit installation. Could you try repeating the steps with this 32-bit version of MinGW64? https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/