It is harmless. win32com, from pywin32 <https://pypi.org/project/pywin32/>, 
is conditionally imported by distutils.msvccompiler which is standard lib. 
PyInstaller has a special hook file telling it how to load win32com but it 
doesn’t cover the case where it is not installed (it probably should) so it 
trips the ImportError you’re seeing. PyInstaller can’t include win32com as 
you don’t have it but unless you genuinely want to use the msvc compiler 
from a PyInstaller bundle this shouldn’t do anything. If you really don’t 
like it, passing --exclude win32com prevents the above.
On Wednesday, June 24, 2020 at 2:54:36 PM UTC+1 [email protected] wrote:

> Pyinstaller throws this error message sequence:
>
>
>
>
>
>
>
>
> *20330 INFO: Processing pre-safe import module hook   win32comTraceback 
> (most recent call last):  File "<string>", line 2, in 
> <module>ModuleNotFoundError: No module named 'win32com'20452 INFO: 
> Processing pre-safe import module hook   win32comTraceback (most recent 
> call last):  File "<string>", line 2, in <module>ModuleNotFoundError: No 
> module named 'win32com'*
>
> although the resulting executable seems to work fine.  Why the messages?  
> Should this concern me?
>
> Entire log below.
>
> pk
>
> ________
>
> L:\TPy>pyinstaller --noupx --windowed --hidden-import=babel.numbers 
> --onefile --name=TPyfx TPyfx187.py 
> 65 INFO: PyInstaller: 3.6
> 65 INFO: Python: 3.7.6
> 66 INFO: Platform: Windows-10-10.0.18362-SP0
> 75 INFO: wrote L:\TPy\TPyfx.spec
> 155 INFO: UPX is available.
> 158 INFO: Extending PYTHONPATH with paths
> ['L:\\TPy', 'L:\\TPy']
> 158 INFO: checking Analysis
> 158 INFO: Building Analysis because Analysis-00.toc is non existent
> 158 INFO: Initializing module dependency graph...
> 158 INFO: Caching module graph hooks...
> 158 INFO: Analyzing base_library.zip ...
> 5805 INFO: Caching module dependency graph...
> 5936 INFO: running Analysis Analysis-00.toc
> 5964 INFO: Adding Microsoft.Windows.Common-Controls to dependent 
> assemblies of final executable
>   required by 
> c:\users\micro\appdata\local\programs\python\python37\python.exe
> 6041 INFO: Analyzing L:\TPy\TPyfx_1.87.py
> 6537 INFO: Processing pre-safe import module hook   
> urllib3.packages.six.moves
> 11162 INFO: Processing pre-find module path hook   distutils
> 11180 INFO: distutils: retargeting to non-venv dir 
> 'c:\\users\\micro\\appdata\\local\\programs\\python\\python37\\lib'
> 11292 INFO: Processing pre-find module path hook   site
> 11300 INFO: site: retargeting to fake-dir 
> 'c:\\users\\micro\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\PyInstaller\\fake-modules'
> 14751 INFO: Processing pre-safe import module hook   
> setuptools.extern.six.moves
> 19298 INFO: Analyzing hidden import 'babel.numbers'
> 19345 INFO: Processing module hooks...
> 19345 INFO: Loading module hook "hook-babel.py"...
> 19477 INFO: Loading module hook "hook-certifi.py"...
> 19480 INFO: Loading module hook "hook-distutils.py"...
> 19482 INFO: Loading module hook "hook-encodings.py"...
> 19567 INFO: Loading module hook "hook-lib2to3.py"...
> 19589 INFO: Loading module hook "hook-pkg_resources.py"...
> 20330 INFO: Processing pre-safe import module hook   win32com
> Traceback (most recent call last):
>   File "<string>", line 2, in <module>
> ModuleNotFoundError: No module named 'win32com'
> 20452 INFO: Processing pre-safe import module hook   win32com
> Traceback (most recent call last):
>   File "<string>", line 2, in <module>
> ModuleNotFoundError: No module named 'win32com'
> 20571 INFO: Excluding import '__main__'
> 20586 INFO:   Removing import of __main__ from module pkg_resources
> 20586 INFO: Loading module hook "hook-pycparser.py"...
> 20590 INFO: Loading module hook "hook-pydoc.py"...
> 20591 INFO: Loading module hook "hook-pytz.py"...
> 20678 INFO: Loading module hook "hook-setuptools.py"...
> 21344 INFO: Loading module hook "hook-sysconfig.py"...
> 21348 INFO: Loading module hook "hook-xml.dom.domreg.py"...
> 21350 INFO: Loading module hook "hook-xml.py"...
> 21351 INFO: Loading module hook "hook-_tkinter.py"...
> 21604 INFO: checking Tree
> 21604 INFO: Building Tree because Tree-00.toc is non existent
> 21604 INFO: Building Tree Tree-00.toc
> 21786 INFO: checking Tree
> 21786 INFO: Building Tree because Tree-01.toc is non existent
> 21786 INFO: Building Tree Tree-01.toc
> 21827 INFO: Looking for ctypes DLLs
> 21843 INFO: Analyzing run-time hooks ...
> 21844 INFO: Including run-time hook 'pyi_rth_pkgres.py'
> 21851 INFO: Including run-time hook 'pyi_rth__tkinter.py'
> 21856 INFO: Including run-time hook 'pyi_rth_certifi.py'
> 21870 INFO: Looking for dynamic libraries
> 22143 INFO: Looking for eggs
> 22143 INFO: Using Python library 
> c:\users\micro\appdata\local\programs\python\python37\python37.dll
> 22143 INFO: Found binding redirects: 
> []
> 22143 INFO: Warnings written to L:\TPy\build\TPyfx\warn-TPyfx.txt
> 22203 INFO: Graph cross-reference written to 
> L:\TPy\build\TPyfx\xref-TPyfx.html
> 22294 INFO: checking PYZ
> 22294 INFO: Building PYZ because PYZ-00.toc is non existent
> 22294 INFO: Building PYZ (ZlibArchive) L:\TPy\build\TPyfx\PYZ-00.pyz
> 22946 INFO: Building PYZ (ZlibArchive) L:\TPy\build\TPyfx\PYZ-00.pyz 
> completed successfully.
> 22959 INFO: checking PKG
> 22966 INFO: Building PKG because PKG-00.toc is non existent
> 22966 INFO: Building PKG (CArchive) PKG-00.pkg
> 52863 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
> 52966 INFO: Bootloader 
> c:\users\micro\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe
> 52966 INFO: checking EXE
> 52966 INFO: Building EXE because EXE-00.toc is non existent
> 52966 INFO: Building EXE from EXE-00.toc
> 52969 INFO: Appending archive to EXE L:\TPy\dist\TPyfx.exe
> 53125 INFO: Building EXE from EXE-00.toc completed successfully.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/9a1329f9-ecd0-4e81-b67d-deb117d80bf4n%40googlegroups.com.

Reply via email to