Tag Archives: Python error

ModuleNotFoundError: No module named ‘speech_recognition’

ModuleNotFoundError: No module named 'speech_recognition'

Error: While executing the Python program on another server I got the following error:

runfile('C:/Users/SYSTEM001/.spyder-py3/untitled6.py', wdir='C:/Users/SYSTEM001/.spyder-py3')
Traceback (most recent call last):

  File "C:\Users\SYSTEM001\.spyder-py3\untitled6.py", line 2, in <module>
    import speech_recognition as sr

ModuleNotFoundError: No module named 'speech_recognition'

Cause: PIP program speech recognition is not installed.

Solution: Install the PIP program

pip install SpeechRecognition

pip install SpeechRecognition
Collecting SpeechRecognition
  Downloading SpeechRecognition-3.10.0-py2.py3-none-any.whl (32.8 MB)
Collecting requests>=2.26.0
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
Note: you may need to restart the kernel to use updated packages.Collecting charset-normalizer<4,>=2
  Downloading charset_normalizer-3.3.0-cp38-cp38-win_amd64.whl (97 kB)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\SYSTEM001\anaconda3\lib\site-packages (from requests>=2.26.0->SpeechRecognition) (2020.12.5)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\SYSTEM001\anaconda3\lib\site-packages (from requests>=2.26.0->SpeechRecognition) (1.26.4)
Requirement already satisfied: idna<4,>=2.5 in c:\users\SYSTEM001\anaconda3\lib\site-packages (from requests>=2.26.0->SpeechRecognition) (2.10)
Installing collected packages: charset-normalizer, requests, SpeechRecognition
  Attempting uninstall: requests
    Found existing installation: requests 2.25.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
conda-repo-cli 1.0.4 requires pathlib, which is not installed.
anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.

    Uninstalling requests-2.25.1:
      Successfully uninstalled requests-2.25.1
Successfully installed SpeechRecognition-3.10.0 charset-normalizer-3.3.0 requests-2.31.0