Some Windows users may encounter this error “cx_Freeze: Python error in main script” when installing an English language pack, running an executable file created with Python, etc. How to solve this problem? Well, this post from MiniTool Partition Wizard will offer you several solutions.
There are many reasons for the cx_Freeze Python error. You can choose corresponding solutions to solve your problem.
Method 1: Uninstall PlayTV or Raptr
According to some Windows users’ reports, the problem “cx_Freeze: Python error in main script” may be caused by a poorly written Phyton application like PlayTV or Raptr. If you are in this case, you can try to uninstall PlayTV or Raptr to fix the cx_Freeze Python error.
There are two ways to uninstall applications. Scroll down to know the detail. (Here I take the PlayTV application as an example.)
1. Uninstall Applications from Apps & Features
Step 1: Click the Start button, and then click the Settings button to open Windows Settings.
Step 2: In the Settings window, choose the Apps option.
Step 3: Under the Apps & features option, scroll down to find the PlayTV application, click this application, and then choose the Uninstall button.
2. Uninstall Applications from Programs & Features
Step 1: Press the Win + R keys to open the Run window on the computer. Type appwiz.cpl in the search box, and click OK or press Enter.
Step 2: Once in the Programs and Features window, scroll down through the list of installed applications and locate the PlayTV application. Right-click it and then choose Uninstall from the drop-down menu.
After uninstalling the PlayTV application, follow the steps above to uninstall Raptr or other applications that may trigger the cx_Freeze Python error.
Method 2: Delete the Game’s AppData Folder & Reinstall the Game
If you encounter the cx_Freeze Python error with a game, you can try to clear the contents of the AppData folder (that’s usually hidden) and then reinstall the game to solve this problem. How to do that? Here is the complete guide:
Step 1: Press Win + R on the keyboard, type %appdata% in the search box, and press Enter.
Step 2: Back to the AppData folder, then choose the Local folder.
Step 3: In the Local folder, find the folder that holds information about the game that triggers the cx_Freeze Python error. Then, open the folder, select everything inside, and delete all the contents.
Step 4: Now, follow the steps in Method 1 to uninstall the game that triggers the error “cx_Freeze: Python error in main script”.
Once the uninstallation is complete, please restart your computer and reinstall the game to see if the cx_Freeze Python error is fixed.
Method 3: Run an SFC Scan
If you try to install something like an English language pack, the cx_Freeze Python error may be caused by corrupt system files. In this case, you can use the SFC (System File Checker) tool to solve your problem. Follow the steps below to do that:
Step 1: Press the Win + S keys, and type cmd in the search box. Then, right-click it and choose Run as administrator.
Step 2: Type sfc /scannow and press Enter. Then, the corrupt system files will be found and replaced.
After that, restart your computer to check if there is still an error “cx_Freeze: Python error in main script”.
That’s all about how to fix the “cx_Freeze: Python error in main script” error on Windows. Do you have any questions about this topic? Please leave them in the comment zone and we will try to answer them as soon as possible.