-
Notifications
You must be signed in to change notification settings - Fork 548
Windows Launch Issues (cx_Freeze errors)
Some Windows users experience issues when launching OpenShot Video Editor, specifically an error dialog which contains the title, cx_Freeze: Python error in main script. This error almost always indicates that a required DLL needed by OpenShot is missing.
OpenShot is compatible with Windows 7 and later; OpenShot does not support versions earlier than Windows 7 (e.g., Vista and XP). OpenShot can run on both 32-bit and 64-bit versions of Windows (you can find both downloads on the Windows download page), but we recommend that you first make sure you have installed the correct version of OpenShot (64-bit vs. 32-bit) for your version of Windows.
First, we highly recommend you install any Windows Updates that are pending. Especially any updates related to Microsoft Visual C++ Redistributable packages. Restart your computer, and re-test OpenShot. If OpenShot still fails to launch, please continue this guide.
Next, we need to verify that you have installed the following Microsoft Visual C++ Redistributable package: C:\Windows\System32\msvcrt.dll
. You can download and install this for either 32-bit or 64-bit versions of Windows. Once you have installed this, restart your computer, and re-test OpenShot. If OpenShot still fails to launch, please continue this guide.
For some reason, many Windows systems contain the following file (installed by some 3rd party program): C:\Windows\System32\zlib1.dll
. This file takes priority over the zlib1.dll shipped with OpenShot and causes OpenShot to crash on launch. Please try backing up and removing C:\Windows\System32\zlib1.dll
, restart your computer, and relaunch OpenShot.
Next, we need to make sure your antivirus software (e.g., Microsoft Defender) is not blocking the installation of specific DLLs installed by OpenShot, or blocking certain DLLs from executing when launching OpenShot. Carefully disable real-time virus scanning temporarily, re-install OpenShot, and attempt to relaunch OpenShot. If this works, you likely need to add some rules to your virus scanner to ignore OpenShot files. Re-enable your virus scanner. If this step doesn't help, please continue this guide.
You will have to do some troubleshooting to determine which DLL file is missing from your computer. Before we continue, you will need Dependency Walker. It is a free download, so please take a moment and install the appropriate version for your version of Windows.
- Install Dependency Walker
- Launch Dependency Walker
- Drag the following files into Dependency Walker, one at a time, and wait for them to load:
- C:\Program Files\OpenShot Video Editor\launch.exe
- C:\Program Files\OpenShot Video Editor\libopenshot.dll
- C:\Program Files\OpenShot Video Editor\libopenshot-audio.dll
- C:\Program Files\OpenShot Video Editor\Qt5Gui.dll
- C:\Program Files\OpenShot Video Editor\avcodec-57.dll
- Look for any missing DLLs. You can collapse the list of dependencies found using the [-] and [+] icons. Look at each of the above files, and scan for missing dependencies. Sometimes false positives are listed, so be patient and review the entire list.
- If you think you have found the missing DLL, be very careful, and Google ways to restore that file or re-install that file from a safe destination (i.e., Windows Update, Microsoft.com, or other reliable sites). Don't use a random DLL download website.
Another way to see which DLLs are loaded and potentially what is causing the crash is to use the Microsoft Process Explorer. Follow these steps to produce a *.txt output file of what happens during an OpenShot launch attempt.
- Download Process Explorer from the Microsoft SysInternals library. (You don't have to install the app, you extract and run it.)
- Launch OpenShot, and leave that error box open when it appears
- Open (or launch) Process Explorer
- Hit Ctrl+d to open Process Explorer's bottom pane
- Select
launch.exe
(the still-running OpenShot launcher) in the top half of the window - Click on anything in the bottom half of the window, then hit Ctrl+a
- A file-save dialog will open, asking to save a text file. Save it anywhere you like. That file will contain a list of all the DLLs that OpenShot has loaded.
- Go to the folder where you saved the file, then open it (the *.txt file) in a text editor. See if you can find the source of the problem, or share this *.txt file on a GitHub issue (so a developer can help you analyze it).
In sporadic cases, OpenShot may show a cx_Freeze error under standard user accounts even if the installation is complete and accurate. It is necessary to try running the program as an administrator to determine any difference. You will need to provide a password under UAC for any given admin account. If the program opens successfully, you will need to adjust compatibility settings, typically by right-clicking on the 'OpenShot Video Editor' icon on the desktop and going to 'Properties' > 'Compatibility' tab, and under 'Settings' selecting 'Run this program as an Administrator.`
Still no luck? Our final recommendation is to create a new Windows user called "OpenShot User" and log in to that Windows account/profile. Re-install OpenShot as this new user, and attempt to launch OpenShot. If this successfully launches, then most likely, your other user has something corrupted in their profile.
If you replace a missing file or find a workaround to launch OpenShot successfully, please get in touch with [email protected] and reference which steps worked to improve the OpenShot installer and improve this Wiki guide.
Want to help improve OpenShot (and make some friends in the process 🤗)? Please consider joining our open-source team by filling out this quick contributor form and introduce yourself! All volunteers are welcome, regardless of skills or skill level. Let's build something amazing!