Speech recognition package and other packages not importing on pycharm

Hey everyone,
I am trying to create my own alexa as an assignment on pycharm but when install the packages through the terminal it doesn’t import but tells me the modules don’t exist. so I install the packages on pycharm library itself but it processes the code without returning any output. I am using windows

And when I check, the package exist in the pip folder. Attached are the screenshots of the code.
Please what do I do?

Hello and welcome.

Pycharm will tell you this, yes, because Pycharm is using a different copy of Python vs. the one where you installed the packages using the terminal.

This doesn’t mean there is a problem. What output do you think you should see instead, and why?

The screenshot that you show is demonstrating the first problem, not the second, so it does not help with understanding what went wrong for the second problem.

If you have a code example and you are convinced the problem is in the code, it will be easier for us if we can see the relevant code as neatly formatted text, rather than an image. Please read the pinned thread to see how to format code properly on the forum. This way, we can be sure that the problem is in the text that we see, and not “off screen” in the image. It also means we can copy and paste the code to experiment with it ourselves.

I personally recommend understanding how to use the fundamental tools first - editing the code with an ordinary text editor; running code from the command line (as well as installing packages that way); writing simple programs that don’t need any third-party libraries before trying to make ones that do need them; practicing with reading and understanding the error messages. If you start out with an “environment” as simple as possible, you can more easily understand what goes wrong when it gets more complicated. It’s true that these tools are trying to make your life easier in the long run, but they require a certain amount of understanding to work well.