You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

导入moviepy的VideoFileClip时出现ImportError:找不到requests模块

Fixing ImportError: No module named requests When Importing MoviePy's VideoFileClip

Hey, let's sort out this error you're running into!

Looking at your traceback, the problem is straightforward: your Python 2.7 environment is missing the requests library, which MoviePy's downloader.py module relies on for handling web-related tasks.

Here's how to fix it:

Just install the missing requests package using pip (for Python 2.7):

pip install requests

If you have both Python 2 and 3 installed and want to make sure you're targeting the right version, use pip2 instead:

pip2 install requests

Once the installation finishes, go ahead and run your code again—your from moviepy.editor import VideoFileClip line should work without that ImportError popping up.

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

火山引擎 最新活动