ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found

今天在学校服务器使用matplotlib时,出现错误如下:

 File "~/MyCode/RecursiveSeparation/uPIT_2spk/trainer.py", line 16, in 
   import matplotlib.pyplot as plt
 File "~/anaconda3/lib/python3.7/site-packages/matplotlib/pyplot.py", line 32, in 
   import matplotlib.colorbar

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

网上查了很多解决方案,最简单的方式如下:

$ vim  ~/.bash_profile  # 将下面两行命令写进文件
LD_LIBRARY_PATH=~/anaconda3/lib:$LD_LIBRARY_PATH     
export LD_LIBRARY_PATH
$ source  ~/.bash_profile

至此,问题解决!

你可能感兴趣的:(ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found)