We often use pyinstaller to convert python script to exe. Here is a tutorial:
Bundle a Python Application to an EXE with PyInstaller: A Beginner Guide – Python 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:\.
the system could not find “F:\”
Building EXE from EXE-00.toc completed successfully.
but i can’t find exe file lol
the simplest way is to use: auto-py-to-exe, you can read this tutorial to find how to use this tool.
or you can find all problems when converting py to exe.