擅长:python、mysql、java
<p>你还没有真正进口你需要的东西。不只是<code>import moviepy</code>,您需要做以下三件事之一:</p>
<pre><code>from moviepy.editor import * # Quick and dirty
import moviepy.editor as mp # You don’t need to specify everything you are using, just use mp before each eg clip = mp.VideoFileClip(params)
from moviepy.editor import VideoFileClip # Mosy efficient but you need to specify everything from moviepy that you are using
</code></pre>
<p>对于您的代码片段,我将使用最后一个。在</p>
<p>要进一步了解如何最好地从moviepy导入内容,请阅读文档<a href="http://zulko.github.io/moviepy/getting_started/efficient_moviepy.html#efficient" rel="nofollow noreferrer">here</a>。在</p>