Python杂谈 | (13) allennlp jsonnet mac 安装失败解决方案

安装命令: pip install jsonnet

报错如下:

lang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] ld: library not found for -lstdc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'g++' failed with exit status 1

原因说的比较清楚是 libstdc++已经被遗弃了。

解决方案:使用源码安装jsonnet

1)https://pypi.org/project/jsonnet/#files 下载源码

2)解压缩

3)在压缩路径下,执行下面的安装命令 CFLAGS=-stdlib=libc++ python3 setup.py install 或者 sudo CFLAGS=-stdlib=libc++ python3 setup.py install

这样就解决了这个jsonnet的安装问题

发布了405 篇原创文章 · 获赞 765 · 访问量 14万+

猜你喜欢

转载自blog.csdn.net/sdu_hao/article/details/104316393