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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章