Python import error solution

Case 1:  lib can not find a required lib (e.g. libstdc++, included in libgcc), both lib in conda

ImportError: /home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/../../../libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/diego/anaconda3/lib/python3.5/site-packages/matplotlib/_path.cpython-35m-x86_64-linux-gnu.so)

It seems that a newer version of gcc is required, in particular one that contains CXXABI_1.3.9

After some reading, there are two possible solutions:

  1. One for the people without anaconda, which is somehow explained here.

  2. In my case I use Anaconda, and the problem is solved with conda install libgcc, which upgrades the current gcc compiler.

More info about this can be found here

Case 2: lib can not find a required lib (e.g. libstdc++), the required lib not in conda

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/matplotlib/_path.cpython-36m-x86_64-linux-gnu.so)

add conda lib's path to LD_LIBRARY_PATH

add /home/username/software/anaconda3/lib/ in the LD_LIBRARY_PATH ... Be aware that /lib64/libstdc++.so.6 currently comes first in "LD_LIBRARY_PATH"

From:

https://github.com/AllenDowney/ThinkStats2/issues/92

https://stackoverflow.com/questions/49875588/importerror-lib64-libstdc-so-6-version-cxxabi-1-3-9-not-found

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值