[英]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.