ModuleNotFoundError in VS_code - modulenotfounderror

i am having error in VS code python
ModuleNotFoundError: No module named 'playsound'
while running code
from playsound import playsound
#playsound('D:\learning\code with herry\ad5262f8da78d9830bb38723f33fe6ca\1. Chapter 1\play.mp3')
I have already installed playsound module, installation and uninstallation done many time. already taken actionas as per existing similar question and answer. still receiving this error, can anyone help me with same.

Related

Python Module not found, but it is installed?

I wanted to make an Instagram bot so I can automate my posts and whatever. My problem is, I get the following Error when I try importing the module/library named "instagrapi":
Exception has occurred: ModuleNotFoundError
No module named 'instagrapi'
File "C:\Users\Simon\Desktop\Py\bot.py", line 1, in <module>
from instagrapi import Client
the error is in line 1 of my code, which simply states "from instagrapi import Client"
Now to my question: I already installed instagrapi, but VSCode tells me I didn't. I installed Python 3.11 but it runs in 3.10 or what so ever.
If someone can help me, please do so, thanks in advance
I tried reinstalling the library and restarting vscode, but it didn't help.
I'm running out of ideas

How to resolve ModuleNotFoundError: No module named 'gmsh'

I recently downloaded and installed gmsh for a research project. I specifically want to work on the gmsh module in python. So I started with its first tutorial, but when I trying to run it is giving the "Modulenotfounderror: No module named 'gmsh'. I've been looking for what I might've done wrong for hours but no success.
here's the screenshot of the code from spyder

Error: ModuleNotFoundError: No module named 'maya.cmds'

I tried running a python script that imports maya.cmds and maya.mel as Maya python script in windows. (Maya - animation software by Autodesk)
I am getting errors while importing the modules. Can someone help me figure out this error?
Error screenshot
Please do not post screenshots with errors or code. Just post the code here.
Do you work with mayapy? And do you set your pythonpath appropriately?

Exception has occurred: ModuleNotFoundError No module named 'cv2'

I have code that requires: import cv2
but get the error message: Exception has occurred: ModuleNotFoundError
No module named 'cv2'
I have seen exactly the same question before, but all the suggestions fail. The question is 6 years old and hence am repeating it.
various failed suggestions:
conda install --channel https://conda.anaconda.org/menpo opencv3
conda install -c menpo opencv
I am using Windows 10 and have python 3.8.1 running.
I have removed cv2 from the code which works without error and resolves the issue.
The link here (at time of writing, version 4.1.2.3) describes the opencv-python package:
opencv-python link
With the following description of cv2 towards the bottom of the page:
It's easier for users to understand opencv-python than cv2 and it makes it easier to find the package with search engines. cv2 (old interface in old OpenCV versions was named as cv) is the name that OpenCV developers chose when they created the binding generators. This is kept as the import name to be consistent with different kind of tutorials around the internet. Changing the import name or behaviour would be also confusing to experienced users who are accustomed to the import cv2.

ModuleNotFoundError: No module named 'cuda_prefs'

I have been trying to use brian2 cuda support brian2cuda. I have been able to get brian2 up and working. However, though brian2cuda gets installed as per the instructions.
When I try to import brian2cuda am getting cuda_prefs error ModuleNotFoundError: No module named 'cuda_prefs'.
I have tried to solve but not to avail.
Thanks and Regards,
vku

Resources