We often use pyinstaller to convert python script to exe. Here is a tutorial:
However, we may get UPX is not available error. In this tutorial, we will introduce you how to fix it.
UPX is not available
When we use pyinstaller to bundle python, we may get it. Here is an example:
How to fix this error?
UPX is not available, which means pyinstaller can not find upx.exe to encrypt exe file. In order to fix it, we should download upx.
You can download upx.exe here.
As to us, we are using win 10. We download upx-3.96-win64.zip.
Then, we will paste upx.exe to disk F:\
You can add –upx-dir f:\ to fix this error. Here is the result:
pyinstaller main.py --key 123456 -n test -F -w --upx-dir f:\
- f:\ is the directory where upx.exe is in.
- You can not use f:\upx.exe, but f:\.