[英]exe file works in Anaconda Prompt window but not in Windows command line
My python code include tkinter and matplotlib. I create a.exe with pyinstaller.我的python代码包括tkinter和matplotlib。我用pyinstaller创建了一个.exe。 When I run the exe I get this message:
当我运行 exe 时,我收到此消息:
appdata\local\programs\python\python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:623:
MatplotlibDeprecationWarning: The MATPLOTLIBDATA environment variable
was deprecated in Matplotlib 3.1 and will be removed in 3.3.
exec(bytecode, module.__dict__)
When I run it with Anaconda Prompt, the message appears and my interface run normally.当我以 Anaconda 提示符运行它时,出现该消息并且我的界面运行正常。 If I run it with Windows command line (or double clik) the message appears but no interface appears.
如果我使用 Windows 命令行(或双击)运行它,则会出现消息但不会出现界面。
If I suppress matplotlib import, the exe works with Windows command line too.如果我抑制 matplotlib 导入,该 exe 也适用于 Windows 命令行。 The issue is clearly caused by matplotlib, but I have no idea how to solve it.
这个问题明明是matplotlib引起的,但是我不知道怎么解决。 Can you help me?
你能帮助我吗?
Thank you.谢谢你。
Using: Python 3.7.9 Pyinstaller 3.6 Matplotlib 3.2.2使用:Python 3.7.9 Pyinstaller 3.6 Matplotlib 3.2.2
The solution is here: https://github.com/pyinstaller/pyinstaller/issues/4968#issuecomment-662075970解决方法在这里: https://github.com/pyinstaller/pyinstaller/issues/4968#issuecomment-662075970
The issue comes from pyinstaller and not from missing options or environment问题来自 pyinstaller 而不是缺少选项或环境
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.