import matplotlib print(matplotlib.get_data_path()) # 例如输出 /root/miniconda3/lib/python3.10/site-packages/matplotlib/mpl-data