在mac上安装libicu dev

发布于 2021-01-29 17:44:21

如何在mac上安装libicu dev。这是网站上推荐的说明
文档

sudo apt-get install python-numpy libicu-dev

http://polyglot.readthedocs.org/en/latest/Installation.html

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>

error

关注者
0
被浏览
51
1 个回答
  • 面试哥
    面试哥 2021-01-29
    为面试而生,有面试问题,就找面试哥。

    我刚让PyICU安装在OSX上,因为同样的原因它失败了
    错误。以下是我的建议:
    1安装自制(OSX包管理器)
    2brew安装icu4c#安装库;可能已经安装
    三。验证是否存在必要的include目录:ls-l/usr/local/opt/icu4c/include/
    4如果您没有该目录,则可能需要重新安装icu4u。我发现必须执行以下操作:
    1brew删除icu4c
    2brew安装icu4c
    5尝试安装polyglot以查看是否可以找到icu4c:pip install polyglot
    6如果仍然有问题,可以尝试指定库位置:CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install polyglot
    编辑:有进一步的变化。我当前安装icu的过程:
    1brew安装icu4c
    2brew link icu4c—强制
    三。ICU\u VERSION=<BREW\u ICU\u VERSION>CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip安装pyicu



知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看