简体   繁体   English

ModuleNotFoundError:尽管已安装,但没有名为“moviepy”的模块

[英]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 的解释器有包或安装新包:

  • in Pycharm IDE at bottom right look for "Python 3.10" or something similar.在右下角的 Pycharm IDE 中寻找“Python 3.10”或类似的东西。
  • Click that and then click interpreter settings.单击它,然后单击解释器设置。
  • This should open a window and all the packages loaded should be listed.这应该会打开一个窗口,并且应该列出所有加载的包。 Here you can add new packages as well在这里您也可以添加新包

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:虽然安装了 Django 中没有名为“moviepy”的模块 - ModuleNotFoundError: No module named 'moviepy' in Django although installed ModuleNotFoundError:没有名为“PyDIP”的模块,尽管它已安装 - ModuleNotFoundError: No module named 'PyDIP', although it's installed ModuleNotFoundError:尽管 Anaconda 导航器上安装了 ffmpeg,但 Spyder 上没有名为“ffmpeg”的模块 - ModuleNotFoundError: No module named 'ffmpeg' on Spyder although ffmpeg is installed on Anaconda navigator ModuleNotFoundError: No module named 'Practise' - 虽然这个文件夹存在 - ModuleNotFoundError: No module named 'Practise' - Although this folder exists “ModuleNotFoundError:即使安装了模块,也没有名为‘...’的模块 - "ModuleNotFoundError: No module named '…' even though module is installed Raspberry Pi - 没有名为“RPI”的模块(虽然已安装) - Raspberry Pi - No Module named 'RPI' (although installed) ModuleNotFoundError:没有名为&#39;django&#39;的模块,但安装了django - ModuleNotFoundError: No module named 'django' , but django is installed ModuleNotFoundError:没有名为“psycopg2”的模块(但已安装) - ModuleNotFoundError: No module named 'psycopg2' (But it is installed) ModuleNotFoundError:没有名为“IPython”的模块,但已安装 ipython - ModuleNotFoundError: No module named 'IPython', but ipython is installed ModuleNotFoundError:没有名为“六”的模块,六已安装 - ModuleNotFoundError: No module named 'six' , Six is already installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM