rspeer / wordfreq

Access a database of word frequencies, in various natural languages.
Other
1.4k stars 101 forks source link

Cannot install on Windows 10, marisa-trie dependency error; plaintext data possible? #85

Closed andreskarjus closed 4 years ago

andreskarjus commented 4 years ago

Installing the dependency marisa-trie runs into this:

` C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\include\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe' failed with exit status 2

ERROR: Command errored out with exit status 1: 'c:\users****\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\****\AppData\Local\Temp\pip-install-w5unt35s\marisa-trie\setup.py'"'"'; file='"'"'C:\Users\****\AppData\Local\Temp\pip-install-w5unt35s\marisa-trie\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****\AppData\Local\Temp\pip-record-2nqt16fl\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output. `

I found this issue in the marisa-trie repo hinting that the latest versions need be built on some platforms, and other issues pointing at problems with Windows 10, and marisa-trie seems to be abandoned. I just need the word frequencies for some words in some languages, that's all; is there perhaps a way to bypass this? Thanks.

P.S.: While the Python package is convenient (if one is a Python user), having the frequencies available in a more universal, platform and language independent format too (e.g. just csv) would be super neat!

andreskarjus commented 4 years ago

...and already solved it by using conda-forge; but maybe will be useful for somebody: conda config --add channels conda-forge conda config --set channel_priority strict conda install marisa-trie