[英]Python module requests working in anaconda prompt but not in windows 10 command line
[英]exe file works in Anaconda Prompt window but not in Windows command line
我的python代码包括tkinter和matplotlib。我用pyinstaller创建了一个.exe。 当我运行 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__)
当我以 Anaconda 提示符运行它时,出现该消息并且我的界面运行正常。 如果我使用 Windows 命令行(或双击)运行它,则会出现消息但不会出现界面。
如果我抑制 matplotlib 导入,该 exe 也适用于 Windows 命令行。 这个问题明明是matplotlib引起的,但是我不知道怎么解决。 你能帮助我吗?
谢谢你。
使用:Python 3.7.9 Pyinstaller 3.6 Matplotlib 3.2.2
解决方法在这里: https://github.com/pyinstaller/pyinstaller/issues/4968#issuecomment-662075970
问题来自 pyinstaller 而不是缺少选项或环境
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.