尽管安装了模块,但Python ModuleNotFoundError [英] Python ModuleNotFoundError despite the modules being installed

查看:133
本文介绍了尽管安装了模块,但Python ModuleNotFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在导入时:

import speech_recognition as sr
import pyttsx3

我得到了错误:

ModuleNotFoundError: No module named 'speech_recognition'
ModuleNotFoundError: No module named 'pyttsx3'

推荐答案

Pls.run pip list 在同一虚拟环境中,并检查您的模块是否在列表中.

Pls.run pip list in the same virtual env and check if your modules are present in the list.

此外,请先在python终端中运行同一个导入文件.

Also, pls.run in the python terminal the same import first.

这篇关于尽管安装了模块,但Python ModuleNotFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆