导入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




