运行脚本时出现这个报错意味着当前conda环境gcc动态库需要更新
我们可以在相应conda环境下输入以下代码更新:
conda install -c anaconda libstdcxx-ng
然后输入以下内容查看当前环境下的lib目录下是否更新好:
strings /home/xxx/Software/anaconda3/envs/gpupytorch/lib/libstdc++.so.6|grep GLIBCXX_3.4.29
显示以下内容代表更新完成:
vi ~/.bash_profile
在文件中添加如下代码:
LD_LIBRARY_PATH=/home/xxx/Software/anaconda3/envs/gpupytorch/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
退出编辑状态,source一下 就可以了::
source ~/.bash_profile