epfml / sent2vec

General purpose unsupervised sentence representations
Other
1.19k stars 256 forks source link

Errors in sent2vec make and pip install #60

Closed VArdulov closed 4 years ago

VArdulov commented 5 years ago

When running the make in the sent2vec folder gives me an error from ld where it takes issue with the -lrt flags when building fastText.

This error was fixed when I removed the -lrt flags, but even then when running pip install . command gcc fails to find <atomic> library every time. I have tried explicitly finding and including them in the CXXFLAGS and CCFLAGS but it did not remedy the situation.

running gcc -v yields the following output: Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

any insight into solving this issue would be highly appreciated.

-Victor

welcomebyvenkat commented 5 years ago

I am getting below error after installing microsoft visual c++ 14.16.

And i am using windows 10 (Don't sent2Vec is supported or not)

`C:\Sent2Vec_POC\sent2vec>pip install . Processing c:\sent2vec_poc\sent2vec Building wheels for collected packages: sent2vec Running setup.py bdist_wheel for sent2vec ... error Complete output from command c:\users\vshanmugam\appdata\local\programs\python \python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\VSH ANM~1\AppData\Local\Temp\pip-req-build-ak55dhb4\setup.py';f=getattr(tokeniz e, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(co mpile(code, file, 'exec'))" bdist_wheel -d C:\Users\VSHANM~1\AppData\Local\T emp\pip-wheel-z0rvdatj --python-tag cp36: running bdist_wheel running build running build_ext building 'sent2vec' extension creating build creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\vshanmugam\appdata \local\programs\python\python36\lib\site-packages\numpy\core\include -Ic:\users\ vshanmugam\appdata\local\programs\python\python36\include -Ic:\users\vshanmugam\ appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microso ft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Progra m Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x8 6)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Window s Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\inc lude\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0. 17763.0\cppwinrt" /EHsc /Tpsrc/sent2vec.cpp /Fobuild\temp.win-amd64-3.6\Release\ src/sent2vec.obj -std=c++0x -Wno-cpp -pthread -Wno-sign-compare error: command 'cl.exe' failed: No such file or directory


Failed building wheel for sent2vec Running setup.py clean for sent2vec Failed to build sent2vec Installing collected packages: sent2vec Running setup.py install for sent2vec ... error Complete output from command c:\users\vshanmugam\appdata\local\programs\pyth on\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\V SHANM~1\AppData\Local\Temp\pip-req-build-ak55dhb4\setup.py';f=getattr(token ize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec( compile(code, file, 'exec'))" install --record C:\Users\VSHANM~1\AppData\Loc al\Temp\pip-record-mmbd8cyu\install-record.txt --single-version-externally-manag ed --compile: running install running build running build_ext building 'sent2vec' extension creating build creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc -Ic:\users\vshanmugam\appda ta\local\programs\python\python36\lib\site-packages\numpy\core\include -Ic:\user s\vshanmugam\appdata\local\programs\python\python36\include -Ic:\users\vshanmuga m\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Micro soft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Prog ram Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files ( x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Wind ows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\i nclude\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10. 0.17763.0\cppwinrt" /EHsc /Tpsrc/sent2vec.cpp /Fobuild\temp.win-amd64-3.6\Releas e\src/sent2vec.obj -std=c++0x -Wno-cpp -pthread -Wno-sign-compare error: command 'cl.exe' failed: No such file or directory

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

Command "c:\users\vshanmugam\appdata\local\programs\python\python36\python.exe - u -c "import setuptools, tokenize;file='C:\Users\VSHANM~1\AppData\Local\ \Temp\pip-req-build-ak55dhb4\setup.py';f=getattr(tokenize, 'open', open)(fil e);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\VSHANM~1\AppData\Local\Temp\pip-record-mmbd8 cyu\install-record.txt --single-version-externally-managed --compile" failed wit h error code 1 in C:\Users\VSHANM~1\AppData\Local\Temp\pip-req-build-ak55dhb4`

mpagli commented 5 years ago

Sadly, Sent2vec offers no guarantee on Mac or Windows. Especially with the latest addition of an inference mode using shared memory. No tests were done on Mac or Windows. Should be possible to make it work on Mac, but Windows is a long shot.

yasonk commented 5 years ago

This is resolved by copying the code from fasttext setup.py per issue here: https://github.com/epfml/sent2vec/issues/48

However, I still get the ld: library not found for -lrt error for one of the extensions.

pHequals7 commented 5 years ago

Any updates on this? Anyone following up to fix the Windows issue?

BramVanroy commented 4 years ago

+1 for Windows support

mpagli commented 4 years ago

Maybe the best way to use it on Windows would be to write a small API running in a docker container. If anyone wants to contribute, I'd be happy to merge.

BramVanroy commented 4 years ago

@guptaprkhr Did you close this because Windows is now fully supported?

guptaprkhr commented 4 years ago

No, I closed it because of lack of activity. I'll open it again and as @mpagli said, if somebody wants to contribute by writing a small API running in a docker container to use it on Windows, we'll happily merge it.

martinjaggi commented 4 years ago

there is a separate issue for a docker container