我遇到了一个警告,这个警告只会在运行 pyinstaller 可执行文件时出现。
...appdata\local\programs\python\python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:627: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
exec(bytecode, module.__dict__)
我已经尝试了这里的所有建议:Python/matplotlib:去掉matplotlib.mpl警告
我也尝试过这个,但最终结果没有任何变化: Pyinstaller exe隐藏警告信息
在最终的可执行文件中,MatplotlibDeprecation警告仍然存在,而在像Pycharm这样的IDE中运行代码时,这些警告是基线不存在的。
使用: Python 3.7.2 Pyinstaller 3.5 Matplotlib 3.1.1