Search code examples
pythonlibraries

Python ModuleNotFoundError despite the modules being installed


While importing:

import speech_recognition as sr
import pyttsx3

I get the error:

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

Solution

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

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