[英]ModuleNotFoundError: No module named 'moviepy' although installed
When I run:当我运行时:
from moviepy.editor import *
I get this error:我收到此错误:
Traceback (most recent call last):
File "C:\Users\myname\PycharmProjects\moviepy_1\main.py", line 1, in <module>
from moviepy.editor import *
ModuleNotFoundError: No module named 'moviepy'
However, when I check pip list in command prompt I can see it's installed (along with everything else it needs, ffmpeg, numpy, etc.)但是,当我在命令提示符下检查 pip 列表时,我可以看到它已安装(以及它需要的所有其他东西,ffmpeg、numpy 等)
Why can't my program find the moviepy module?为什么我的程序找不到moviepy模块? Is it looking in the wrong place?
是不是找错地方了? How do I find out where it is looking, how do I tell it to look in the right place?
我如何找出它正在寻找的位置,我如何告诉它在正确的位置寻找?
I am using Windows 10. I am not using a virtual environment.我使用的是 Windows 10。我没有使用虚拟环境。 I'm using the PyCharm IDE.
我正在使用 PyCharm IDE。 Please be explicit with your answer, I have only a basic understanding of Python and programming.
请明确回答,我对 Python 和编程只有基本的了解。
As we discussed in the comments, the issue is that the Python interpreter that being used by your command terminal is different than the one being used by Pycharm IDE.正如我们在评论中所讨论的,问题在于您的命令终端使用的 Python 解释器与 Pycharm IDE 使用的解释器不同。 You have
moviepy
installed in the terminal's python env, but not in the Pycharm IDE.您在终端的 python 环境中安装了
moviepy
,但在 Pycharm IDE 中没有。
To make sure that the Pycharm IDE's interpreter has the package or install new packages:要确保 Pycharm IDE 的解释器有包或安装新包:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.