You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there,
I'm struggling with pyinstaller and matplotlib. I'm able to get a .exe from my python code but when I include something with matplotlib the console of the exe doesn't open the matplotlib window and ends the run.
I simplified it to:
import matplotlib.pyplot as plt
x = [0,1,2,3]
y = x
plt.plot(x,y)
plt.show()
Running the resulting .exe works on the same computer/user (the matplotlib window opens). However, when I change the user for testing the compatibility of the .exe, the console runs trough the program without opening the matplotlib window. The last lines of the console are:
import 'matplotlib.backends.qt_editor._formsubplottool' # <_frozen_importlib_external.SourcelessFileLoader object at 0x0000027ED17817F0>
import 'matplotlib.backends.backend_qt5' # <_frozen_importlib_external.SourcelessFileLoader object at 0x0000027ED1768AF0>
import 'matplotlib.backends.backend_qt5agg' # <_frozen_importlib_external.SourcelessFileLoader object at 0x0000027ED174DBB0>
import 'matplotlib.pyplot' # <_frozen_importlib_external.SourcelessFileLoader object at 0x0000027ECF8ED7C0>
# PyQt5.QtX11Extras not found in PYZ
So, no direct Error message.
I'm working on Windows, Python 3.8.5, PyInstaller 4.2, Matplotlib 3.3.2.
My normal, non-reduced python code defines a gui in which you can press a button and a matplotlib plot should appear. There, when pressing the button, no matplotlib window occurs and the gui closes. Before doing so, everything works fine for the other parts of the gui. After the gui has closed you can find the same last lines within the console as shown above.
What I already checked:
Pyinstaller hooks (nltk, matplotlib, matplotlib.backends). Matplotlib related updates of them suggested in earlier questions are already implemented in PyInstaller 4.2.
PyInstaller messages related to matplotlib during .exe generation:
171020 INFO: Matplotlib backend "GTK3Agg": ignored
The GTK3 backends require PyGObject
171506 INFO: Matplotlib backend "GTK3Cairo": ignored
The GTK3 backends require PyGObject
171822 INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx' from 'matplotlib.backends' (c:\users\jonah\anaconda3\lib\site-packages\matplotlib\backends\__init__.py)
172656 INFO: Matplotlib backend "nbAgg": added
<string>:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
173141 INFO: Matplotlib backend "Qt4Agg": added
<string>:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4cairo backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
173589 INFO: Matplotlib backend "Qt4Cairo": added
174113 INFO: Matplotlib backend "Qt5Agg": added
174576 INFO: Matplotlib backend "Qt5Cairo": added
175062 INFO: Matplotlib backend "TkAgg": added
175863 INFO: Matplotlib backend "TkCairo": added
176364 INFO: Matplotlib backend "WebAgg": added
176850 INFO: Matplotlib backend "WX": ignored
No module named 'wx'
177198 INFO: Matplotlib backend "WXAgg": ignored
No module named 'wx'
177520 INFO: Matplotlib backend "WXCairo": ignored
No module named 'wx'
177899 INFO: Matplotlib backend "agg": added
178307 INFO: Matplotlib backend "cairo": added
178824 INFO: Matplotlib backend "pdf": added
179325 INFO: Matplotlib backend "pgf": added
179704 INFO: Matplotlib backend "ps": added
180089 INFO: Matplotlib backend "svg": added
180628 INFO: Matplotlib backend "template": added
181330 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\\users\\jonah\\anaconda3\\lib\\site-packages\\PyInstaller\\hooks'...
Reverting to older versions of matplotlib didn't work & causes other problems due to other dependecies within the rest of the code.
Looking forward to some new ideas to solve the issue.
Thanks in advance!
Jonah
The text was updated successfully, but these errors were encountered:
Hey there,
I'm struggling with pyinstaller and matplotlib. I'm able to get a .exe from my python code but when I include something with matplotlib the console of the exe doesn't open the matplotlib window and ends the run.
I simplified it to:
I run pyinstaller with:
Running the resulting .exe works on the same computer/user (the matplotlib window opens). However, when I change the user for testing the compatibility of the .exe, the console runs trough the program without opening the matplotlib window. The last lines of the console are:
So, no direct Error message.
I'm working on Windows, Python 3.8.5, PyInstaller 4.2, Matplotlib 3.3.2.
My normal, non-reduced python code defines a gui in which you can press a button and a matplotlib plot should appear. There, when pressing the button, no matplotlib window occurs and the gui closes. Before doing so, everything works fine for the other parts of the gui. After the gui has closed you can find the same last lines within the console as shown above.
What I already checked:
Looking forward to some new ideas to solve the issue.
Thanks in advance!
Jonah
The text was updated successfully, but these errors were encountered: