在 mac 上安装 libicu-dev [英] installing libicu-dev on mac
本文介绍了在 mac 上安装 libicu-dev的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在 mac 上安装 libicu-dev.这是文档中推荐的说明
how do i install libicu-dev on mac. This is the instruction recommended on the documentation
sudo apt-get install python-numpy libicu-dev
http://polyglot.readthedocs.org/en/latest/Installation.html
我正在使用 anaconda 但它似乎总是抛出一个
I am using anaconda but it seems to always throw up an
In file included from _icu.cpp:27:
./common.h:86:10: fatal error: 'unicode/utypes.h' file not found
#include <unicode/utypes.h>
错误
推荐答案
我刚刚在 OSX 上安装了 PyICU,因为同样的错误导致它失败.这是我推荐的:
I just got PyICU to install on OSX, after it was failing due to that same error. Here is what I recommend:
- 安装 homebrew(OSX 包管理器)
brew install icu4c
# 安装库;可能已经安装- 验证必要的包含目录是否存在:
ls -l/usr/local/opt/icu4c/include/
- 如果您没有那个目录,您可能需要重新安装 icu4u.我发现我必须执行以下操作:
- Install homebrew (package manager for OSX)
brew install icu4c
# Install the library; may be already installed- Verify that the necessary include directory is present:
ls -l /usr/local/opt/icu4c/include/
- If you do not have that directory, you may need to reinstall icu4u. I found that I had to do the following:
brew 删除 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的过程:
There have been further changes. My current process for installing icu:
brew install icu4c
brew link icu4c --force
ICU_VERSION=
CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu
这篇关于在 mac 上安装 libicu-dev的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文