python 打包exe出现RuntimeError: Coul

2021-09-13  本文已影响0人  Roshan_

在打包包含matplotlib库时出现RuntimeError: Could not find the matplotlib data files的解决方法。

错误提示里面的介绍:
MatplotlibDeprecationWarning: Matplotlib installs where the data is not in the mpl-data subdirectory of the package are deprecated since 3.2 and support for them will be removed two minor releases later.

问题原因:matplotlib3.2以后就把mpl-data分离出去了,可以用以下方法处理。
解决方法:https://blog.csdn.net/kobeyu652453/article/details/108871179
亲测有用!!

另外:Python做完GUI程序,打包exe,用的Pyinstaller模块,但是打包完之后,总是会弹出一个黑框才出现GUI,怎么去掉控制台?
方法一:pyinstaller -F mycode.py --noconsole
方法二:pyinstaller -F -w mycode.py (-w就是取消控制台窗口)

上一篇 下一篇

猜你喜欢

热点阅读