Monday, October 29, 2018

WARNING: lib not found when converting python script using pyInstaller

When trying to convert a Python script to .exe using pyInstaller, warning message is shown:
WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Program Files (x86)\Python\python.exe


The command line used is:
pyinstaller --onefile --noconsole main.py


Looking for the file, I could find it in the following path:
C:\Program Files (x86)\Java\jre1.8.0_181\bin


pyinstaller version in use is 3.3.1 and the latest one available at the moment is 3.4, so I proceeded on upgrading it.


Firstly uninstalling the current pyinstaller version:
pip uninstall pyinstaller


Then installing the newest and desired version:
pip install pyinstaller


After updating pyInstaller version, build was successfull:
set JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_181
set PATH=%JAVA_HOME%\bin:%PATH%
pyinstaller --onefile --noconsole main.py

No comments:

Post a Comment