Unable to install "SpeechRecognition" module

Hi everyone,
This is my first time working on a project with ROS. I am working on a voice-controlled turtlebot, for which I need the SpeechRecognition module.

I installed it using

pip3 install SpeechRecognition

It shows that it is installed but I keep getting the import modue error.

I went to check if the vs code workspace python version is the same as the external terminal.
Found it to be different.
It was python 3.8.10 in the external one, and it is python 2.7.18 in the vs code terminal

I installed the module in both terminals to no avail. Am I missing something? Could someone please help?

Very much appreciated

Thanks everyone!

I suppose you are getting the import error in the IDE (VS Code). You can ignore this as long as you are not getting the error in the code. Sometimes the IDE is not able to detect the modules you have installed.

You don’t need to install anything in the VS Code terminal, and you should avoid using it altogether. Always use the external terminal.

PS: at this time, user-installed modules are not persisted at the end of a session. You’ll need to install this module every time you come back unless you install it in a virtual environment within your user workspace, which is persisted.

Oh thank you so much! Will keep in mind

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.