You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows7 64位系统下Python MoviePy运行报错[WinError 193]求助

Fixing OSError: [WinError 193] with MoviePy on 64-bit Windows

Hey there, let's work through this frustrating WinError 193 issue you're hitting. This error almost always boils down to a 32-bit/64-bit compatibility mismatch in your setup, so let's break down the most effective fixes step by step:

1. Verify Your FFmpeg is 64-bit

That error often pops up if you're using a 32-bit FFmpeg binary with your 64-bit Python/MoviePy setup:

  • Double-check that you downloaded the 64-bit Windows build of FFmpeg (not the 32-bit one). Head to the official FFmpeg site to grab the correct version—look for builds labeled "win64".
  • After extracting the FFmpeg folder, make sure the bin directory (containing ffmpeg.exe, ffplay.exe, ffprobe.exe) is added to your system's PATH environment variable. Alternatively, you can manually point MoviePy to the correct binary in your code:
    from moviepy.config import change_settings
    change_settings({"FFMPEG_BINARY": r"C:\full\path\to\your\64bit\ffmpeg.exe"})
    
    (Use a raw string r"" or double backslashes \\ in the path to avoid escape character issues.)

2. Confirm Your Python Installation is 64-bit

It's easy to accidentally install 32-bit Python even on a 64-bit system. To check:

  • Open Command Prompt and run:
    python -c "import sys; print(sys.maxsize > 2**32)"
    
    If the output is True, you're on 64-bit Python (good). If it's False, you'll need to uninstall the 32-bit Python and reinstall the 64-bit version from the official Python site.

3. Reinstall MoviePy with 64-bit Python

If you had a 32-bit Python before switching, residual 32-bit MoviePy files might be causing issues:

  • Uninstall the current MoviePy:
    pip uninstall moviepy -y
    
  • Reinstall it using your 64-bit Python's pip (use pip3 or specify your Python path if you have multiple versions, e.g., py -3.11 -m pip install moviepy).

4. Check Imagemagick's Bit Version

Even though you have Imagemagick installed, ensure it's the 64-bit variant. You can point MoviePy to its binary explicitly too:

change_settings({"IMAGEMAGICK_BINARY": r"C:\path\to\64bit\ImageMagick\convert.exe"})

Final Tip

After making any changes to environment variables or paths, restart your command prompt/IDE to ensure the changes take effect—this is often overlooked but crucial!

内容的提问来源于stack exchange,提问作者Vova

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 04:09:13