Notice
Recent Posts
Recent Comments
Link
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

Astro Coke

[Python] Install polyglot on Mac 본문

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