# Fix PyInstaller UPX is not available Error – PyInstaller Tutorial

By | April 15, 2021

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.

https://github.com/upx/upx/releases/

pyinstaller main.py --key 123456 -n test -F -w --upx-dir f:\