Install imageio -fmpeg
pip install imageio-ffmpeg
Ensure that the same Python environment is used In some cases, you may have more than one legend, which causes the library to be installed in a different environment. To check, use:
python -m pip install moviepy