如何在Mac上安装libicu-dev。这是文档上推荐的说明
sudo apt-get install python-numpy libicu-dev
http://polyglot.readthedocs.org/en/latest/Installation.html
我正在使用 Anaconda ,但似乎总是抛出
In file included from _icu.cpp:27:
./common.h:86:10: fatal error: 'unicode/utypes.h' file not found
#include <unicode/utypes.h>
错误
最佳答案
由于相同的错误导致PyICU失败后,我才将其安装在OSX上。这是我的建议:
brew install icu4c
#安装库;可能已经安装了ls -l /usr/local/opt/icu4c/include/
brew remove icu4c
brew install icu4c
pip install polyglot
CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install polyglot
编辑:有进一步的变化。我当前的安装icu的过程:
brew install icu4c
brew link icu4c --force
ICU_VERSION=<BREW_ICU_VERSION> CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu