Short description
cant get pyqtgraph run within *.exe
neither cx_freeze
neither pyinstaller
Code to reproduce
cx_freeze
sample code from this repository
https://github.com/pyqtgraph/pyqtgraph/tree/master/examples/cx_freeze
Expected behavior
*.exe should run and open a window with the plot inside
Real behavior
code runs fine executed directly through python
cx_freeze
popup with error "This application failed to start becasuse no QT plattform plugin could be initialized. Reinstalling the application may fix this problem."
pyinstaller
included following because pyinstaller didnt include follwoin imports:
hiddenimports=["pyopengl","pyqtgraph","pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyqt5",
"pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5",
"pyqtgraph.imageview.ImageViewTemplate_pyqt5"]
error message
Traceback (most recent call last):
File "plotTest.py", line 14, in <module>
File "pyqtgraph\__init__.py", line 403, in plot
File "pyqtgraph\widgets\PlotWidget.py", line 56, in __init__
File "pyqtgraph\graphicsItems\PlotItem\PlotItem.py", line 118, in __init__
File "pyqtgraph\graphicsItems\ButtonItem.py", line 19, in __init__
ZeroDivisionError: float division by zero
[20988] Failed to execute script plotTest
### Tested environment(s)
# Name Version Build Channel
altgraph 0.17 pyhd8ed1ab_0 conda-forge
asteval 0.9.23 pyhd8ed1ab_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
ca-certificates 2020.12.5 h5b45459_0 conda-forge
certifi 2020.12.5 py37h03978a9_1 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
cx-logging 3.0 pypi_0 pypi
cx_freeze 6.6 py37hcc03f2d_0 conda-forge
decorator 5.0.9 pyhd8ed1ab_0 conda-forge
future 0.18.2 py37h03978a9_3 conda-forge
icu 68.1 h0e60522_0 conda-forge
importlib-metadata 4.3.1 py37h03978a9_0 conda-forge
ipykernel 5.5.5 py37h7813e69_0 conda-forge
ipython 7.24.0 py37h7813e69_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
jedi 0.18.0 py37h03978a9_2 conda-forge
jpeg 9d h8ffe710_0 conda-forge
jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge
jupyter_core 4.7.1 py37h03978a9_0 conda-forge
libblas 3.9.0 5_hd5c7e75_netlib conda-forge
libcblas 3.9.0 5_hd5c7e75_netlib conda-forge
libclang 11.1.0 default_h5c34c98_1 conda-forge
liblapack 3.9.0 5_hd5c7e75_netlib conda-forge
libpng 1.6.37 h1d00b33_2 conda-forge
libsodium 1.0.18 h8d14728_1 conda-forge
lmfit 1.0.2 pyhd8ed1ab_0 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
macholib 1.14 pyh9f0ad1d_1 conda-forge
matplotlib-inline 0.1.2 pyhd8ed1ab_2 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
nomkl 1.0 h5ca1d4c_0 conda-forge
numpy 1.20.3 py37hcbcd69c_1 conda-forge
openssl 1.1.1k h8ffe710_0 conda-forge
parso 0.8.2 pyhd8ed1ab_0 conda-forge
pefile 2021.5.24 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 21.1.2 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.18 pyha770c72_0 conda-forge
pygments 2.9.0 pyhd8ed1ab_0 conda-forge
pyinstaller 4.3 py37hd4a9ce8_0 conda-forge
pyinstaller-hooks-contrib 2020.11 pyhd8ed1ab_0 conda-forge
pyqt 5.12.3 py37h03978a9_7 conda-forge
pyqt-impl 5.12.3 py37hf2a7229_7 conda-forge
pyqt5-sip 4.19.18 py37hf2a7229_7 conda-forge
pyqtchart 5.12 py37hf2a7229_7 conda-forge
pyqtgraph 0.12.1 pyhd8ed1ab_0 conda-forge
pyqtwebengine 5.12.1 py37hf2a7229_7 conda-forge
pyserial 3.5 pyhd8ed1ab_0 conda-forge
python 3.7.10 h7840368_100_cpython conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.7 1_cp37m conda-forge
pywin32 300 py37hcc03f2d_0 conda-forge
pywin32-ctypes 0.2.0 py37h03978a9_1003 conda-forge
pyzmq 22.1.0 py37hcce574b_0 conda-forge
qt 5.12.9 h5909a2a_4 conda-forge
qtconsole 5.1.0 pyhd8ed1ab_0 conda-forge
qtpy 1.9.0 py_0 conda-forge
scipy 1.6.3 py37h924764e_0 conda-forge
setuptools 49.6.0 py37h03978a9_3 conda-forge
sip 4.19.25 py37hf2a7229_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.35.5 h8ffe710_0 conda-forge
tornado 6.1 py37hcc03f2d_1 conda-forge
traitlets 5.0.5 py_0 conda-forge
typing_extensions 3.7.4.3 py_0 conda-forge
uncertainties 3.1.5 pyhd8ed1ab_0 conda-forge
vc 14.2 hb210afc_4 conda-forge
vs2015_runtime 14.28.29325 h5e1d092_4 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
wheel 0.36.2 pyhd3deb0d_0 conda-forge
wincertstore 0.2 py37h03978a9_1006 conda-forge
zeromq 4.3.4 h0e60522_0 conda-forge
zipp 3.4.1 pyhd8ed1ab_0 conda-forge
zlib 1.2.11 h62dcd97_1010 conda-forge
Additional context
Short description
cant get pyqtgraph run within *.exe
neither cx_freeze
neither pyinstaller
Code to reproduce
cx_freeze
sample code from this repository
https://github.com/pyqtgraph/pyqtgraph/tree/master/examples/cx_freeze
Expected behavior
*.exe should run and open a window with the plot inside
Real behavior
code runs fine executed directly through python
cx_freeze
popup with error
"This application failed to start becasuse no QT plattform plugin could be initialized. Reinstalling the application may fix this problem."pyinstaller
included following because pyinstaller didnt include follwoin imports:
hiddenimports=["pyopengl","pyqtgraph","pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyqt5",
"pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5",
"pyqtgraph.imageview.ImageViewTemplate_pyqt5"]
error message
Additional context