Closed prabhatM closed 4 years ago
Fresh install of python 3.7 (64 bit) on my windows 10 machine had no difficulty installing cyhunspell. Can you post the error your seeing? It's likely something specific to your machine.
Hi, Thank you for your reply. I must confess, every time I see your mail my happiness hits the ceiling. I have spent more than eighteen months building my customised dictionary and I am so eager to demonstrate it at our next PyData meetup and also to my professional peer group.
I tried to reinstall on my Windows machine again. While building hunspell.hunspell extension, it looks for Microsoft C++ 14.0 . I have the latest Microsoft Visual C++ . After I installed Microsoft build tools, I am still getting errors.
I am attaching the error text file for your reference.
Regards
Prabhat MOHANTY
cyhunspell_error_on_windows10.txt https://drive.google.com/file/d/1144aQQQXY-RVsj-syRfzl2Sj1IVkz-Rk/view?usp=drivesdk
On Mon, 22 Jul 2019, 08:49 Matthew Seal, notifications@github.com wrote:
Fresh install of python 3.7 (64 bit) on my windows 10 machine had no difficulty installing cyhunspell. Can you post the error your seeing? It's likely something specific to your machine.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MSeal/cython_hunspell/issues/10?email_source=notifications&email_token=ABXKGXFMZOLEHHZ7Y5X4VWDQAURMDA5CNFSM4IEHTYW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2OUZQQ#issuecomment-513625282, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXKGXF2DYYOCH22VVF7GNTQAURMDANCNFSM4IEHTYWQ .
Hi,
Attaching the error text file
On Mon, Jul 22, 2019 at 8:49 AM Matthew Seal notifications@github.com wrote:
Fresh install of python 3.7 (64 bit) on my windows 10 machine had no difficulty installing cyhunspell. Can you post the error your seeing? It's likely something specific to your machine.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MSeal/cython_hunspell/issues/10?email_source=notifications&email_token=ABXKGXFMZOLEHHZ7Y5X4VWDQAURMDA5CNFSM4IEHTYW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2OUZQQ#issuecomment-513625282, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXKGXF2DYYOCH22VVF7GNTQAURMDANCNFSM4IEHTYWQ .
-- Regards
Prabhat MOHANTY Ph : 09873406314
Microsoft Windows [Version 10.0.17134.829] (c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>d:\pythonenv\scripts\activate
(pythonenv) C:\WINDOWS\system32>d:
(pythonenv) D:>pip install cyhunspell Collecting cyhunspell Using cached https://files.pythonhosted.org/packages/72/d3/f17298ceb2f5856798f9802b4efab1c46b2120e79ba92546af6e3fb92a1f/CyHunspell-1.3.0.tar.gz Requirement already satisfied: cacheman>=2.0.6 in d:\pythonenv\lib\site-packages (from cyhunspell) (2.1.0) Requirement already satisfied: future>=0.16.0 in d:\pythonenv\lib\site-packages (from cacheman>=2.0.6->cyhunspell) (0.17.1) Requirement already satisfied: psutil>=2.1.0 in d:\pythonenv\lib\site-packages (from cacheman>=2.0.6->cyhunspell) (5.6.3) Requirement already satisfied: six>=1.10.0 in d:\pythonenv\lib\site-packages (from cacheman>=2.0.6->cyhunspell) (1.12.0) Building wheels for collected packages: cyhunspell Running setup.py bdist_wheel for cyhunspell ... error Complete output from command d:\pythonenv\scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\Vishnu\AppData\Local\Temp\pip-wheel-e3ycvsg2 --python-tag cp37: running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\hunspell copying hunspell\platform.py -> build\lib.win-amd64-3.7\hunspell copying hunspell__init.py -> build\lib.win-amd64-3.7\hunspell package init file 'dictionaries__init.py' not found (or not a regular file) package init file 'libs\msvc\init__.py' not found (or not a regular file) copying hunspell\hunspell.pxd -> build\lib.win-amd64-3.7\hunspell copying hunspell\thread.pxd -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.pyx -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.cpython-36m-x86_64-linux-gnu.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.cpython-37m-x86_64-linux-gnu.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\thread.hpp -> build\lib.win-amd64-3.7\hunspell creating build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_AU.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_CA.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_GB.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_NZ.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_US.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_ZA.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\test.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_AU.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_CA.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_GB.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_NZ.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_US.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_ZA.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\test.dic -> build\lib.win-amd64-3.7\dictionaries creating build\lib.win-amd64-3.7\libs creating build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc11-x64.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc11-x86.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc14-x64.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc14-x86.lib -> build\lib.win-amd64-3.7\libs\msvc running build_ext building 'hunspell.hunspell' extension creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\hunspell C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\hunspell -IC:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\external\hunspell-1.3.3\src -Id:\pythonenv\include "-Id:\Program Files\Python37\include" "-Id:\Program Files\Python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program 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)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tphunspell\hunspell.cpp /Fobuild\temp.win-amd64-3.7\Release\hunspell\hunspell.obj /EHsc /DHUNSPELL_STATIC hunspell.cpp hunspell\hunspell.cpp(2035): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data hunspell\hunspell.cpp(6350): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data hunspell\hunspell.cpp(6528): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\libs\msvc /LIBPATH:d:\pythonenv\libs "/LIBPATH:d:\Program Files\Python37\libs" "/LIBPATH:d:\Program Files\Python37" /LIBPATH:d:\pythonenv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" libhunspell-msvc14-x64.lib /EXPORT:PyInit_hunspell build\temp.win-amd64-3.7\Release\hunspell\hunspell.obj /OUT:build\lib.win-amd64-3.7\hunspell\hunspell.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.lib Creating library build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.exp LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library libhunspell-msvc14-x64.lib(hunspell.obj) : error LNK2001: unresolved external symbol imp_memchr libhunspell-msvc14-x64.lib(csutil.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(phonet.obj) : error LNK2001: unresolved external symbol __imp_strstr libhunspell-msvc14-x64.lib(affentry.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(hunspell.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(hashmgr.obj) : error LNK2001: unresolved external symbol __imp_strstr libhunspell-msvc14-x64.lib(affixmgr.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(suggestmgr.obj) : error LNK2001: unresolved external symbol __imp_strstr build\lib.win-amd64-3.7\hunspell\hunspell.cp37-win_amd64.pyd : fatal error LNK1120: 2 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\link.exe' failed with exit status 1120
Failed building wheel for cyhunspell Running setup.py clean for cyhunspell Failed to build cyhunspell Installing collected packages: cyhunspell Running setup.py install for cyhunspell ... error Complete output from command d:\pythonenv\scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\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\Vishnu\AppData\Local\Temp\pip-record-myokkpd1\install-record.txt --single-version-externally-managed --compile --install-headers d:\pythonenv\include\site\python3.7\cyhunspell: running install running build running build_py creating build creating build\lib.win-amd64-3.7 creating build\lib.win-amd64-3.7\hunspell copying hunspell\platform.py -> build\lib.win-amd64-3.7\hunspell copying hunspell__init.py -> build\lib.win-amd64-3.7\hunspell package init file 'dictionaries__init.py' not found (or not a regular file) package init file 'libs\msvc\init__.py' not found (or not a regular file) copying hunspell\hunspell.pxd -> build\lib.win-amd64-3.7\hunspell copying hunspell\thread.pxd -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.pyx -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.cpython-36m-x86_64-linux-gnu.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.cpython-37m-x86_64-linux-gnu.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\hunspell.so -> build\lib.win-amd64-3.7\hunspell copying hunspell\thread.hpp -> build\lib.win-amd64-3.7\hunspell creating build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_AU.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_CA.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_GB.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_NZ.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_US.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_ZA.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\test.aff -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_AU.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_CA.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_GB.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_NZ.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_US.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\en_ZA.dic -> build\lib.win-amd64-3.7\dictionaries copying dictionaries\test.dic -> build\lib.win-amd64-3.7\dictionaries creating build\lib.win-amd64-3.7\libs creating build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc11-x64.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc11-x86.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc14-x64.lib -> build\lib.win-amd64-3.7\libs\msvc copying libs\msvc\libhunspell-msvc14-x86.lib -> build\lib.win-amd64-3.7\libs\msvc running build_ext building 'hunspell.hunspell' extension creating build\temp.win-amd64-3.7 creating build\temp.win-amd64-3.7\Release creating build\temp.win-amd64-3.7\Release\hunspell C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\hunspell -IC:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\external\hunspell-1.3.3\src -Id:\pythonenv\include "-Id:\Program Files\Python37\include" "-Id:\Program Files\Python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program 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)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tphunspell\hunspell.cpp /Fobuild\temp.win-amd64-3.7\Release\hunspell\hunspell.obj /EHsc /DHUNSPELL_STATIC hunspell.cpp hunspell\hunspell.cpp(2035): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data hunspell\hunspell.cpp(6350): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data hunspell\hunspell.cpp(6528): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\libs\msvc /LIBPATH:d:\pythonenv\libs "/LIBPATH:d:\Program Files\Python37\libs" "/LIBPATH:d:\Program Files\Python37" /LIBPATH:d:\pythonenv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" libhunspell-msvc14-x64.lib /EXPORT:PyInit_hunspell build\temp.win-amd64-3.7\Release\hunspell\hunspell.obj /OUT:build\lib.win-amd64-3.7\hunspell\hunspell.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.lib Creating library build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\hunspell\hunspell.cp37-win_amd64.exp LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library libhunspell-msvc14-x64.lib(hunspell.obj) : error LNK2001: unresolved external symbol imp_memchr libhunspell-msvc14-x64.lib(csutil.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(phonet.obj) : error LNK2001: unresolved external symbol __imp_strstr libhunspell-msvc14-x64.lib(affentry.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(hunspell.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(hashmgr.obj) : error LNK2001: unresolved external symbol __imp_strstr libhunspell-msvc14-x64.lib(affixmgr.obj) : error LNK2001: unresolved external symbol imp_strstr libhunspell-msvc14-x64.lib(suggestmgr.obj) : error LNK2001: unresolved external symbol __imp_strstr build\lib.win-amd64-3.7\hunspell\hunspell.cp37-win_amd64.pyd : fatal error LNK1120: 2 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\link.exe' failed with exit status 1120
----------------------------------------
Command "d:\pythonenv\scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\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\Vishnu\AppData\Local\Temp\pip-record-myokkpd1\install-record.txt --single-version-externally-managed --compile --install-headers d:\pythonenv\include\site\python3.7\cyhunspell" failed with error code 1 in C:\Users\Vishnu\AppData\Local\Temp\pip-install-_rtjqj2g\cyhunspell\ You are using pip version 18.1, however version 19.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
(pythonenv) D:>
So basically Visual Studio is trying to link a dynamic library in against our static libraries. I can't reproduce this so something is different on your setup -- I did notice you have 32 bit VisualStudio installed which might be the difference. Do you have a development or student version of that you installed yourself?
To test this further we can try a few things:
First, try adding '/NODEFAULTLIB:MSVCRT'
to the list on this line:
https://github.com/MSeal/cython_hunspell/blob/master/setup.py#L11
before running pip install .
while inside the cyhunspell directory.
If that fails, a more drastic '/NODEFAULTLIB'
might do the trick.
This may or may not work -- it's a bit of a long-shot.
A longer shot is to add '/MD'
to that same line instead. This should fail but if I remember sometimes visual studio can pull static libs into dynamic libs for python C dependencies and make it work.
Finally, try adding '/verbose'
to the same list instead if the first path doesn't work so we can see what library it's angry about. This should print out more information we can analyze.
Hi,
Thank you for the response. I don't use Visual Studio. But I installed the community edition only for the MSVc++ libraries.
Regards
Prabhat MOHANTY
On Wed, 24 Jul 2019, 10:49 Matthew Seal, notifications@github.com wrote:
So basically Visual Studio is trying to link a dynamic library in against our static libraries. I can't reproduce this so something is different on your setup -- I did notice you have 32 bit VisualStudio installed which might be the difference. Do you have a development or student version of that you installed yourself?
To test this further we can try a few things: First, try adding '/NODEFAULTLIB:MSVCRT' to the list on this line: https://github.com/MSeal/cython_hunspell/blob/master/setup.py#L11 before running pip install . while inside the cyhunspell directory.
If that fails, a more drastic '/NODEFAULTLIB' might do the trick.
This may or may not work -- it's a bit of a long-shot.
A longer shot is to add '/MD' to that same line instead. This should fail but if I remember sometimes visual studio can pull static libs into dynamic libs for python C dependencies and make it work.
Finally, try adding '/verbose' to the same list instead if the first path doesn't work so we can see what library it's angry about. This should print out more information we can analyze.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MSeal/cython_hunspell/issues/10?email_source=notifications&email_token=ABXKGXEH5MQNSGONZHFZFYDQA7Q4HA5CNFSM4IEHTYW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VGJWI#issuecomment-514483417, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXKGXDD573TGVLOQBR2WLLQA7Q4HANCNFSM4IEHTYWQ .
I am using the 64 bit version of visual studio community edition
On Wed, 24 Jul 2019, 10:49 Matthew Seal, notifications@github.com wrote:
So basically Visual Studio is trying to link a dynamic library in against our static libraries. I can't reproduce this so something is different on your setup -- I did notice you have 32 bit VisualStudio installed which might be the difference. Do you have a development or student version of that you installed yourself?
To test this further we can try a few things: First, try adding '/NODEFAULTLIB:MSVCRT' to the list on this line: https://github.com/MSeal/cython_hunspell/blob/master/setup.py#L11 before running pip install . while inside the cyhunspell directory.
If that fails, a more drastic '/NODEFAULTLIB' might do the trick.
This may or may not work -- it's a bit of a long-shot.
A longer shot is to add '/MD' to that same line instead. This should fail but if I remember sometimes visual studio can pull static libs into dynamic libs for python C dependencies and make it work.
Finally, try adding '/verbose' to the same list instead if the first path doesn't work so we can see what library it's angry about. This should print out more information we can analyze.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MSeal/cython_hunspell/issues/10?email_source=notifications&email_token=ABXKGXEH5MQNSGONZHFZFYDQA7Q4HA5CNFSM4IEHTYW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VGJWI#issuecomment-514483417, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXKGXDD573TGVLOQBR2WLLQA7Q4HANCNFSM4IEHTYWQ .
Hmm, the HostX86\\x64
implies you have a 32 bit install building a 64 bit library. This seems counter to what you've installed explicitly. Perhaps you have some old vs install lingering on the system? Check what the path to your 64 bit MSVC tooling is. It's possible your system environments are messed up and aren't using the right tool chain -- I've seen this with Windows 10 setups that upgraded from Windows 7/8.
I will check and get back to you. But this is auto upgradation from Microsoft directly with a license.
On Wed, 24 Jul 2019, 11:20 Matthew Seal, notifications@github.com wrote:
Hmm, the HostX86\x64 implies you have a 32 bit install building a 64 bit library. This seems counter to what you've installed explicitly. Perhaps you have some old vs install lingering on the system? Check what the path to your 64 bit MSVC tooling is. It's possible your system environments are messed up and aren't using the right tool chain -- I've seen this with Windows 10 setups that upgraded from Windows 7/8.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MSeal/cython_hunspell/issues/10?email_source=notifications&email_token=ABXKGXC7C2XB5ZGBF4YNZVDQA7UTTA5CNFSM4IEHTYW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2VH4UQ#issuecomment-514489938, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXKGXGIKZJPUUDVXS5UZ33QA7UTTANCNFSM4IEHTYWQ .
I am also facing something similar. I am using python 3.6 on Windows 7 64 bit. Previously it used to work. I don't know what changed in between. Now I am unable to install this package.
ERROR: Failed building wheel for Cyhunspell
Running setup.py clean for Cyhunspell
Failed to build Cyhunspell
Installing collected packages: Cyhunspell
Running setup.py install for Cyhunspell ... error
ERROR: Command errored out with exit status 1:
command: 'd:\workspace\pyanalytics\rasapy\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Tony\\AppData\\Local
\\Temp\\pip-install-6u9ro8u3\\Cyhunspell\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tony\\AppData\\Local\\Temp\\pip-install-6u9ro8u3\\Cyhunspell\\setup.py'"'"';f=get
attr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install -
-record 'C:\Users\Tony\AppData\Local\Temp\pip-record-tmfwzmp2\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\workspace\pya
nalytics\rasapy\venv\include\site\python3.6\Cyhunspell'
cwd: C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\
Complete output (122 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\hunspell
copying hunspell\platform.py -> build\lib.win-amd64-3.6\hunspell
copying hunspell\__init__.py -> build\lib.win-amd64-3.6\hunspell
package init file 'dictionaries\__init__.py' not found (or not a regular file)
package init file 'libs\msvc\__init__.py' not found (or not a regular file)
copying hunspell\hunspell.pxd -> build\lib.win-amd64-3.6\hunspell
copying hunspell\thread.pxd -> build\lib.win-amd64-3.6\hunspell
copying hunspell\hunspell.pyx -> build\lib.win-amd64-3.6\hunspell
copying hunspell\thread.hpp -> build\lib.win-amd64-3.6\hunspell
creating build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_AU.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_CA.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_GB.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_NZ.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_US.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_ZA.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\test.aff -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_AU.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_CA.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_GB.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_NZ.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_US.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\en_ZA.dic -> build\lib.win-amd64-3.6\dictionaries
copying dictionaries\test.dic -> build\lib.win-amd64-3.6\dictionaries
creating build\lib.win-amd64-3.6\libs
creating build\lib.win-amd64-3.6\libs\msvc
copying libs\msvc\libhunspell-msvc11-x64.lib -> build\lib.win-amd64-3.6\libs\msvc
copying libs\msvc\libhunspell-msvc11-x86.lib -> build\lib.win-amd64-3.6\libs\msvc
copying libs\msvc\libhunspell-msvc14-x64.lib -> build\lib.win-amd64-3.6\libs\msvc
copying libs\msvc\libhunspell-msvc14-x86.lib -> build\lib.win-amd64-3.6\libs\msvc
running build_ext
building 'hunspell.hunspell' extension
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Python36\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Python36\lib\distutils\_msvccompiler.py", line 69, in _getall
all_packages.extend(_findvs.findall())
OSError: Error 80070490
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\Users
creating build\temp.win-amd64-3.6\Release\Users\Tony
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell
creating build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\37
3217\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell -IC:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\external\hunspell-1.3.3\src -Id
:\workspace\pyanalytics\rasapy\venv\include -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MS
VC\14.10.25017\Include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-I
C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Win
dows Kits\NETFXSDK\4.6.1\include\um" /EHsc /TpC:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cpp /Fobuild\temp.win-amd64-3.6\Re
lease\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.obj /EHsc /DHUNSPELL_STATIC
hunspell.cpp
C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cpp(2370): warning C4267: '=': conversion from 'size_t' to 'int', possible l
oss of data
C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cpp(7174): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possib
le loss of data
C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cpp(7349): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possib
le loss of data
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EM
BED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\libs\msvc /LIBPATH:d:\workspace\pyanalytics\rasapy\venv\libs /LI
BPATH:C:\Python36\libs /LIBPATH:C:\Python36 /LIBPATH:d:\workspace\pyanalytics\rasapy\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017
\BuildTools\VC\Tools\MSVC\14.10.25017\Lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\um\x64" /LIBPATH:C:\WINDOWS\Microsoft.NET\Framework6
4\v4.0.30319 "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.14393.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" lib
hunspell-msvc14-x64.lib /EXPORT:PyInit_hunspell build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.ob
j /OUT:build\lib.win-amd64-3.6\hunspell\hunspell.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyh
unspell\hunspell\hunspell.cp36-win_amd64.lib
hunspell.obj : warning LNK4197: export 'PyInit_hunspell' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cp36-win_amd64.lib and obj
ect build\temp.win-amd64-3.6\Release\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\hunspell\hunspell.cp36-win_amd64.exp
Generating code
Finished generating code
copying build\lib.win-amd64-3.6\hunspell\hunspell.cp36-win_amd64.pyd -> hunspell
running build_scripts
creating build\scripts-3.6
copying find_library.py -> build\scripts-3.6
copying tar_download.py -> build\scripts-3.6
running install_lib
copying build\lib.win-amd64-3.6\hunspell\hunspell.cp36-win_amd64.pyd -> d:\workspace\pyanalytics\rasapy\venv\Lib\site-packages\hunspell
running install_egg_info
running egg_info
writing CyHunspell.egg-info\PKG-INFO
writing dependency_links to CyHunspell.egg-info\dependency_links.txt
writing requirements to CyHunspell.egg-info\requires.txt
writing top-level names to CyHunspell.egg-info\top_level.txt
reading manifest file 'CyHunspell.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Tony\AppData\Local\Temp\pip-install-6u9ro8u3\Cyhunspell\setup.py", line 116, in <module>
'Programming Language :: Python :: 3'
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python36\lib\distutils\command\install.py", line 557, in run
self.run_command(cmd_name)
File "C:\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
self.run_command('egg_info')
File "C:\Python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\egg_info.py", line 296, in run
self.find_sources()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\egg_info.py", line 303, in find_sources
mm.run()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\egg_info.py", line 534, in run
self.add_defaults()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults
self.read_manifest()
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\sdist.py", line 199, in read_manifest
self.filelist.append(line)
File "d:\workspace\pyanalytics\rasapy\venv\lib\site-packages\setuptools\command\egg_info.py", line 476, in append
path = convert_path(item)
File "C:\Python36\lib\distutils\util.py", line 125, in convert_path
raise ValueError("path '%s' cannot be absolute" % pathname)
ValueError: path '/home/mseal/Workspace/cython_hunspell/hunspell/hunspell.cpp' cannot be absolute
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\workspace\pyanalytics\rasapy\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'
C:\\Users\\Tony\\AppData\\Local\\Temp\\pip-install-6u9ro8u3\\Cyhunspell\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tony\\AppData\\Local\\Temp\\pip-install-6u9ro8u3
\\Cyhunspell\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __fi
le__, '"'"'exec'"'"'))' install --record 'C:\Users\Tony\AppData\Local\Temp\pip-record-tmfwzmp2\install-record.txt' --single-version-externally-managed --compile --
install-headers 'd:\workspace\pyanalytics\rasapy\venv\include\site\python3.6\Cyhunspell' Check the logs for full command output.
First, try adding
'/NODEFAULTLIB:MSVCRT'
to the list on this line: https://github.com/MSeal/cython_hunspell/blob/master/setup.py#L11 before runningpip install .
while inside the cyhunspell directory. This worked for me. Thanks a ton.
Thanks for letting me know. I'll look at adding some compile error wrappers to try this when normal builds fail.
Hi, I am using a Windows 10 machine with Miniconda x64 and, as terminal/command prompt, I use the Anaconda Prompt Powershell. I would like to indicate that performing "pip install cyhunspell==1.3.2" gives the "ValueError: path '/home/mseal/Workspace/cython_hunspell/hunspell/hunspell.cpp' cannot be absolute" mentioned above, but performing "pip install https://github.com/MSeal/cython_hunspell/archive/0ac159ff3bfde05d4920e89ac7fba3f8b1b989da.zip" (the commit of the version) or "pip install https://github.com/MSeal/cython_hunspell/archive/83684feedcb060e32c1b3a98f6577bcedeca2849.zip" (latest commit, for now) works flawlessly.
I believe I found the error @LuisVilarBarbosa -- miniconda seems to not quite be following https://setuptools.readthedocs.io/en/latest/formats.html#sources-txt-source-files-manifest and making some assertions about paths in SOURCES.txt. That file is automatically generating some path info, one of which is showing up as an absolute path. I'll see if I can figure out how to stop that and push out a release today without that source path.
@LuisVilarBarbosa 1.3.4 should have a fix for the issue. Could you try it out on your machine and see if it is resolved for you?
@MSeal It's working fine.
I'm pretty much a newb, so forgive me if you've already addressed this issue, but I've been unable to complete this install as well on Windows 10 64-bit. I did a clean install of python 3.7.4 via spyder 3. I'm not sure how to best provide the error messages, so I'll just paste them directly:
ERROR: Command errored out with exit status 1: 'C:\Users\bdupuis\AppData\Local\Continuum\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bdupuis\AppData\Local\Temp\pip-install-l5mh7qu\cyhunspell\setup.py'"'"'; file='"'"'C:\Users\bdupuis\AppData\Local\Temp\pip-install-l5mh7qu\cyhunspell\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\bdupuis\AppData\Local\Temp\pip-record-srd7f5lq\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
@bkdupuis, I did not make a full analysis of the issue that you are presenting, but I think you are having a problem I already had, which was a compilation problem. I assume that you do not have Visual C++ Build Tools installed. Please, try installing Visual C++ Build Tools and try to install CyHunspell again. You can also install it on Linux, just make sure that g++ is installed.
@LuisVilarBarbosa I did install Visual C++ build tools. I hope of course that I installed the right thing(s). It is possible that I missed some key element of the install. I used "Build Tools for Visual Studio 2019" on this page: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
@bkdupuis, I analyzed again the error you presented and it appears to not be what I expected. It appears that you are using a compiler that is of a different version than the one used by some of the libraries that CyHunspell uses. It might be a problem with the code used to install the dependencies of CyHunspell, but, as indicated above, I was able to install CyHunspell without problems. In case you are using an invalid version of Visual C++ Build Tools, you can try uninstalling the one you have and install Visual Studio Community 2019 with the workload "Desktop development with C++", the one I have installed. I think you are going to install much more than what you will use, but, at least, you have the same development environment.
@LuisVilarBarbosa Well, I did as you suggested, and am still getting errors, and I think they're only slightly different than before. If it helps, I used pip from the Anaconda prompt, since I can't get it to work in the normal cmd prompt. (Says the SSL module isn't available.)
@bkdupuis I think I cannot help much more. On Ubuntu, I was able to install cyhunspell==1.3.4 using pip and having already installed g++ and libhunspell-dev. On Windows 10, I was able to install cyhunspell==1.3.4 using pip and having already installed Visual Studio Community 2019 with the workload "Desktop development with C++". On Ubuntu, I use Miniconda3 with Bash and, on Windows 10, I use Miniconda3 with the Anaconda Powershell Prompt for Miniconda3. If for some reason this fails for you, you can try using "pip install https://github.com/MSeal/cython_hunspell/archive/0ac159ff3bfde05d4920e89ac7fba3f8b1b989da.zip" instead of "pip install cyhunspell==1.3.4". The URL points to a specific version of the source code that I have been able to install several times.
So I was able to "successfully" install cyhunspell from using @MSeal 's advice from above, but I ended up having to add '/MD' in order to get it to install. However, when I tried a test program using the import string from the main page ('from hunspell import Hunspell'), I got the following error. I'm assuming it has something to do with the installation, but could use some help.
runfile('C:/Users/bdupuis/Documents/Export Files/en-BZ/HSTV.py', wdir='C:/Users/bdupuis/Documents/Export Files/en-BZ') Traceback (most recent call last):
File "
File "C:\Users\bdupuis\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)
File "C:\Users\bdupuis\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/bdupuis/Documents/Export Files/en-BZ/HSTV.py", line 4, in
File "C:\Users\bdupuis\AppData\Local\Continuum\anaconda3\lib\site-packages\hunspell__init__.py", line 3, in
ImportError: DLL load failed: The specified module could not be found.
Sorry I have so many projects with active issues I haven't been able to spend any time on this one. To make it so you don't need to be a windows DLL expert to install in different environments I need to make the wheel include the DLLs and compiled code. There's a pattern for this in a few repos, so mostly it means copying that pattern here and doing a new release. I'm not sure when I can get to doing that.
This should now be resolved on the 2.0.0 release! I'll close this thread for now, but if you run into other issues feel free to post a new issue.
Hi,
Tried to install on Windows 10 with Python 3.7 and Pip 18.1. It does not install. Kindly look into it.
Regards
Prabhat