error: command 'gcc' failed with exit status 1错误解决

在尝试使用pipinstall进行包安装时,用户遇到了gcc编译警告和致命错误,导致sasl包安装失败。错误信息显示找不到标准库头文件'string'。通过更换使用conda进行安装,问题得以顺利解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天pip install 安装包出一下错误:
creating build/temp.macosx-10.6-x86_64-2.7/sasl
gcc -fno-strict-aliasing -I/Users/zhangyan/miniconda2/envs/ikang/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isasl -I/Users/zhangyan/miniconda2/envs/ikang/include/python2.7 -c sasl/saslwrapper.cpp -o build/temp.macosx-10.6-x86_64-2.7/sasl/saslwrapper.o
warning: include path for stdlibc++ headers not found; pass ‘-stdlib=libc++’ on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
sasl/saslwrapper.cpp:249:10: fatal error: ‘string’ file not found
#include
^~~~~~~~
1 warning and 1 error generated.
error: command ‘gcc’ failed with exit status 1


Failed building wheel for sasl

解决办法:更换conda安装

conda install sasl

顺利解决~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值