Computer Setup
[Python] Install polyglot on Mac
astrodoo
2022. 10. 6. 17:08
reference: https://medium.com/hackernoon/install-polyglot-on-mac-3c90445abc1f
There is no mac-compatible version of polyglot python package in conda channels. Therefore, we have to install it via secondary method. It is a bit problematic as it raised error when installing via "pip" (even though no error, when it is imported, it raised a dependency errors).
- First let us install the icu4c library using brew.
$ brew install icu4c
- Check installation using
$ ls -l /usr/local/opt/icu4c/include/
- Now install pyicu
$ CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib PYICU_CFLAGS=-std=c++11:-DPYICU_VER='"2.0.3"' pip install pyicu
Then install polyglot
pip install polyglot