首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“未知类型名称‘解密’”:在mac上安装pyicu失败,gcc错误

“未知类型名称‘解密’”:在mac上安装pyicu失败,gcc错误
EN

Stack Overflow用户
提问于 2018-02-05 10:48:31
回答 1查看 965关注 0票数 1

我运行了以下命令(因为我的mac上同时有python2和python3 ):

$CFLAGS=-i/usr/local/opt/icu4c/包括LDFLAGS=-L/usr/local/opt/icu4c/ sudo python3 -m pip install pyicu

错误信息如下:

安装收集的软件包:运行setup.py安装为pyicu .错误从命令/anaconda3 3/bin/python3 3 -u -c“导入setuptools,open)(file);code=f.read().replace('\r\n','open',open)(file);code=f.read().replace(‘\r\n’,‘\n’);f.close()完成输出;exec(编译(代码,文件,'exec'))“安装-记录/tmp/pip-7298jccr-记录/安装-记录.tmp单一版本-外部管理-编译:

代码语言:javascript
复制
Building PyICU 2.0.3 for ICU 58.2

Adding CXXFLAGS="-I/anaconda3/include" from /anaconda3/bin/icu-config
Adding LDFLAGS="-Wl,-rpath,/anaconda3/lib -L/anaconda3/lib -licui18n -licuuc -licudata" from /anaconda3/bin/icu-config
running install
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
copying PyICU.py -> build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/icu
copying icu/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/icu
running build_ext
building '_icu' extension
creating build/temp.macosx-10.7-x86_64-3.6
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -I/anaconda3/include/python3.6m -c _icu.cpp -o build/temp.macosx-10.7-x86_64-3.6/_icu.o -DPYICU_VER="2.0.3" -I/anaconda3/include
In file included from _icu.cpp:27:
./common.h:38:13: error: unknown type name 'decltype'
    typedef decltype(nullptr) nullptr_t;
            ^
./common.h:38:30: error: expected ';' after top level declarator
    typedef decltype(nullptr) nullptr_t;
                             ^
                             ;
2 errors generated.
error: command 'gcc' failed with exit status 1

----------------------------------------

命令“/anaconda3 3/bin/python3 3 -u -c”导入setuptools,open)(file);code=f.read().replace('\r\n','open',open)(file);code=f.read().replace(‘\r\n’,'\n');f.close();(编译(代码,文件,'exec'))“安装-记录/tmp/pip-7298jccr-记录/安装-记录-tmp单版本-外部管理-编译”失败,错误代码1在/私有/tmp/pip-构建-l71tm0m4/pyicu/

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-07 04:09:23

@n.m.认为,-std=c++11需要添加到CFLAGS中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48620855

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档