Traceback (most recent call last): File "main.py", line 11, in <module> from real_cnn_model.train.trainer import CNNTrainer File "/home/ywb/n_imagenet-main/real_cnn_model/train/trainer.py", line 8, in <module> import matplotlib.pyplot as plt File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/__init__.py", line 109, in <module> from . import _api, _version, cbook, docstring, rcsetup File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/rcsetup.py", line 27, in <module> from matplotlib.colors import Colormap, is_color_like File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/colors.py", line 56, in <module> from matplotlib import _api, cbook, scale File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/scale.py", line 23, in <module> from matplotlib.ticker import ( File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/ticker.py", line 136, in <module> from matplotlib import transforms as mtransforms File "/home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/transforms.py", line 46, in <module> from matplotlib._path import ( ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/ywb/n_imagenet-main/your_path/e2t/lib/python3.7/site-packages/matplotlib/_path.cpython-37m-x86_64-linux-gnu.so)这个错误怎么解决
时间: 2023-08-31 09:07:18 浏览: 201
linux 下 pip3 报错“ File “/usr/bin/pip3”, line 9, in from pip import mainImportError: canno”处理
5星 · 资源好评率100%
这个错误是由于你所在的系统中的 libstdc++.so.6 版本过低而导致的。你需要升级 libstdc++.so.6。你可以尝试以下两种方法来解决这个问题:
1. 升级 libstdc++.so.6:
- 首先,使用以下命令查看当前系统中 libstdc++.so.6 的版本:`strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX`
- 然后,使用以下命令安装 libstdc++.so.6 的最新版本:`sudo apt-get update && sudo apt-get install libstdc++6`
2. 更新 matplotlib:
- 首先,使用以下命令卸载当前的 matplotlib:`pip uninstall matplotlib`
- 然后,重新安装 matplotlib:`pip install matplotlib`
如果以上两种方法都无法解决问题,你可以尝试升级你的操作系统。
阅读全文