Mar-30-2021, 05:34 AM
Hi,
I am write program on pycharm & it is running perfectly.
Now i tried to create exe file using pyinstaller.
exe file created but not running.
how to solve this issue.
Here is the output of console.
Need help to sort out problem.
I am write program on pycharm & it is running perfectly.
Now i tried to create exe file using pyinstaller.
exe file created but not running.
how to solve this issue.
Here is the output of console.
Output:C:\Users\BHARAT\PycharmProjects>pyinstaller --onefile -w pt100.py
91 INFO: PyInstaller: 4.2
92 INFO: Python: 3.7.8
92 INFO: Platform: Windows-10-10.0.19041-SP0
93 INFO: wrote C:\Users\BHARAT\PycharmProjects\pt100.spec
96 INFO: UPX is not available.
99 INFO: Extending PYTHONPATH with paths
['C:\\Users\\BHARAT\\PycharmProjects', 'C:\\Users\\BHARAT\\PycharmProjects']
118 INFO: checking Analysis
141 INFO: Building because inputs changed
141 INFO: Initializing module dependency graph...
147 INFO: Caching module graph hooks...
158 WARNING: Several hooks defined for module 'win32ctypes.core'. Please take care they do not conflict.
165 INFO: Analyzing base_library.zip ...
2512 INFO: Processing pre-find module path hook distutils from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
2513 INFO: distutils: retargeting to non-venv dir 'c:\\python\\python37\\lib'
4138 INFO: Caching module dependency graph...
4278 INFO: running Analysis Analysis-00.toc
4302 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\python\python37\python.exe
4408 INFO: Analyzing C:\Users\BHARAT\PycharmProjects\pt100.py
8059 INFO: Processing pre-find module path hook site from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
8060 INFO: site: retargeting to fake-dir 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\fake-modules'
11341 INFO: Processing pre-safe import module hook setuptools.extern.six.moves from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-setuptools.extern.six.moves.py'.
16881 INFO: Processing pre-safe import module hook six.moves from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
19550 INFO: Processing module hooks...
19550 INFO: Loading module hook 'hook-certifi.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
19561 INFO: Loading module hook 'hook-pycparser.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
19562 INFO: Loading module hook 'hook-win32ctypes.core.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
19808 INFO: Loading module hook 'hook-difflib.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19812 INFO: Excluding import of doctest from module difflib
19812 INFO: Loading module hook 'hook-distutils.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19814 INFO: Loading module hook 'hook-distutils.util.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19817 INFO: Excluding import of lib2to3.refactor from module distutils.util
19817 INFO: Loading module hook 'hook-encodings.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19927 INFO: Loading module hook 'hook-heapq.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19931 INFO: Excluding import of doctest from module heapq
19931 INFO: Loading module hook 'hook-importlib_metadata.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
19938 INFO: Loading module hook 'hook-lib2to3.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
20150 INFO: Loading module hook 'hook-matplotlib.backends.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
21044 INFO: Matplotlib backend "GTK3Agg": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_gtk3agg.py", line 5, in <module>
from . import backend_cairo
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
21472 INFO: Matplotlib backend "GTK3Cairo": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_gtk3cairo.py", line 6, in <module>
from . import backend_cairo, backend_gtk3
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
21936 INFO: Matplotlib backend "MacOSX": ignored
cannot import name '_macosx' from 'matplotlib.backends' (c:\python\python37\lib\site-packages\matplotlib\backends\__init__.py)
22327 INFO: Matplotlib backend "nbAgg": ignored
No module named 'IPython'
-c:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
22948 INFO: Matplotlib backend "Qt4Agg": added
23367 INFO: Matplotlib backend "Qt4Cairo": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_qt4cairo.py", line 2, in <module>
from .backend_qt5cairo import _BackendQT5Cairo, FigureCanvasQTCairo
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_qt5cairo.py", line 3, in <module>
from .backend_cairo import cairo, FigureCanvasCairo, RendererCairo
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
23949 INFO: Matplotlib backend "Qt5Agg": added
24361 INFO: Matplotlib backend "Qt5Cairo": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_qt5cairo.py", line 3, in <module>
from .backend_cairo import cairo, FigureCanvasCairo, RendererCairo
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
25055 INFO: Matplotlib backend "TkAgg": added
25765 INFO: Matplotlib backend "TkCairo": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_tkcairo.py", line 6, in <module>
from .backend_cairo import cairo, FigureCanvasCairo, RendererCairo
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
26321 INFO: Matplotlib backend "WebAgg": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_webagg.py", line 27, in <module>
import tornado
ModuleNotFoundError: No module named 'tornado'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_webagg.py", line 29, in <module>
raise RuntimeError("The WebAgg backend requires Tornado.") from err
RuntimeError: The WebAgg backend requires Tornado.
27054 INFO: Matplotlib backend "WX": ignored
No module named 'wx'
27507 INFO: Matplotlib backend "WXAgg": ignored
No module named 'wx'
27962 INFO: Matplotlib backend "WXCairo": ignored
No module named 'wx'
28505 INFO: Matplotlib backend "agg": added
29008 INFO: Matplotlib backend "cairo": ignored
Traceback (most recent call last):
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 15, in <module>
import cairo
ModuleNotFoundError: No module named 'cairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "c:\python\python37\lib\site-packages\matplotlib\backends\backend_cairo.py", line 21, in <module>
import cairocffi as cairo
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 50, in <module>
('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll'))
File "c:\python\python37\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e
29790 INFO: Matplotlib backend "pdf": added
30580 INFO: Matplotlib backend "pgf": added
31181 INFO: Matplotlib backend "ps": added
31845 INFO: Matplotlib backend "svg": added
32602 INFO: Matplotlib backend "template": added
33055 INFO: Loading module hook 'hook-matplotlib.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33601 INFO: Loading module hook 'hook-multiprocessing.util.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33605 INFO: Excluding import of test.support from module multiprocessing.util
33605 INFO: Excluding import of test from module multiprocessing.util
33606 INFO: Loading module hook 'hook-numpy.core.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33785 INFO: Loading module hook 'hook-numpy.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33789 INFO: Loading module hook 'hook-numpy._pytesttester.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33793 INFO: Excluding import of pytest from module numpy._pytesttester
33793 INFO: Loading module hook 'hook-pickle.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
33797 INFO: Excluding import of argparse from module pickle
33797 INFO: Loading module hook 'hook-PIL.Image.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
34248 INFO: Loading module hook 'hook-PIL.ImageFilter.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
34253 INFO: Excluding import of numpy from module PIL.ImageFilter
34253 INFO: Loading module hook 'hook-PIL.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
34256 INFO: Import to be excluded not found: 'FixTk'
34258 INFO: Excluding import of tkinter from module PIL.ImageTk
34261 INFO: Excluding import of PyQt5.QtCore from module PIL.ImageQt
34261 INFO: Excluding import of PyQt5.QtGui from module PIL.ImageQt
34262 INFO: Loading module hook 'hook-PIL.SpiderImagePlugin.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
34266 INFO: Import to be excluded not found: 'FixTk'
34268 INFO: Loading module hook 'hook-pkg_resources.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
34794 INFO: Processing pre-safe import module hook win32com from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.py'.
35394 WARNING: Hidden import "pkg_resources.markers" not found!
35397 INFO: Excluding import of __main__ from module pkg_resources
35398 INFO: Loading module hook 'hook-PyQt5.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
35682 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
35807 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
36096 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
36488 INFO: Loading module hook 'hook-scipy.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
36496 INFO: Loading module hook 'hook-setuptools.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37427 INFO: Excluding import of setuptools.py27compat from module setuptools.command.easy_install
37428 INFO: Excluding import of setuptools.py27compat from module setuptools.package_index
37429 INFO: Excluding import of setuptools.py27compat from module setuptools.depends
37432 INFO: Excluding import of setuptools.py33compat from module setuptools.package_index
37433 INFO: Excluding import of setuptools.py33compat from module setuptools.depends
37433 INFO: Loading module hook 'hook-sysconfig.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37435 INFO: Loading module hook 'hook-xml.dom.domreg.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37436 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37437 INFO: Loading module hook 'hook-xml.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37438 INFO: Loading module hook 'hook-_tkinter.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
37688 INFO: checking Tree
37766 INFO: checking Tree
37903 INFO: checking Tree
37912 INFO: Loading module hook 'hook-pythoncom.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
38485 INFO: Loading module hook 'hook-pywintypes.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
39105 INFO: Loading module hook 'hook-win32com.py' from 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
39720 INFO: Loading module hook 'hook-setuptools.msvc.py' from 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks'...
39724 INFO: Excluding import of numpy from module setuptools.msvc
39773 INFO: Looking for ctypes DLLs
39793 WARNING: library Advapi32 required via ctypes not found
39797 WARNING: library setupapi required via ctypes not found
39879 WARNING: library user32 required via ctypes not found
39890 INFO: Analyzing run-time hooks ...
39900 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgres.py'
39903 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32api.py'
39904 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_win32comgenpy.py'
39906 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py'
39911 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pyqt5.py'
39914 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_mplconfig.py'
39917 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\pyi_rth_certifi.py'
39918 INFO: Including run-time hook 'c:\\python\\python37\\lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth__tkinter.py'
39939 INFO: Looking for dynamic libraries
42964 INFO: Looking for eggs
42964 INFO: Using Python library c:\python\python37\python37.dll
42965 INFO: Found binding redirects:
[]
42979 INFO: Warnings written to C:\Users\BHARAT\PycharmProjects\build\pt100\warn-pt100.txt
43142 INFO: Graph cross-reference written to C:\Users\BHARAT\PycharmProjects\build\pt100\xref-pt100.html
43214 INFO: checking PYZ
43225 INFO: Building because name changed
43226 INFO: Building PYZ (ZlibArchive) C:\Users\BHARAT\PycharmProjects\build\pt100\PYZ-00.pyz
45328 INFO: Building PYZ (ZlibArchive) C:\Users\BHARAT\PycharmProjects\build\pt100\PYZ-00.pyz completed successfully.
45358 INFO: checking PKG
45375 INFO: Building because name changed
45375 INFO: Building PKG (CArchive) PKG-00.pkg
70336 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
70383 INFO: Bootloader c:\python\python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
70398 INFO: checking EXE
70445 INFO: Rebuilding EXE-00.toc because pt100.exe missing
70461 INFO: Building EXE from EXE-00.toc
70476 INFO: Copying icons from ['c:\\python\\python37\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-windowed.ico']
70539 INFO: Writing RT_GROUP_ICON 0 resource with 104 bytes
70539 INFO: Writing RT_ICON 1 resource with 3752 bytes
70539 INFO: Writing RT_ICON 2 resource with 2216 bytes
70539 INFO: Writing RT_ICON 3 resource with 1384 bytes
70539 INFO: Writing RT_ICON 4 resource with 38188 bytes
70539 INFO: Writing RT_ICON 5 resource with 9640 bytes
70539 INFO: Writing RT_ICON 6 resource with 4264 bytes
70539 INFO: Writing RT_ICON 7 resource with 1128 bytes
70539 INFO: Updating manifest in C:\Users\BHARAT\PycharmProjects\build\pt100\runw.exe.ath7ofpe
70664 INFO: Updating resource type 24 name 1 language 0
70680 INFO: Appending archive to EXE C:\Users\BHARAT\PycharmProjects\dist\pt100.exe
71124 INFO: Building EXE from EXE-00.toc completed successfully.
C:\Users\BHARAT\PycharmProjects>
Need help to sort out problem.