Facing Error: ModuleNotFoundError: No module named ‘pymongo’
i tried installing pip pymongo, but it say source already exists, so i tried updating and updated.
i have upated the package and message is below:
C:\Windows\system32>pip install pymongo
Requirement already satisfied: pymongo in c:\program files (x86)\python39-32\lib\site-packages (4.4.0)
Requirement already satisfied: dnspython<3.0.0,>=1.16.0 in c:\program files (x86)\python39-32\lib\site-packages (from pymongo) (2.4.2)
The following instructions give you the active path directory where Python searches for modules.
Does the path directory include the location where the pymongo was downloaded to?
import sys
num = 1
for path in sys.path:
print(str(num) + '.' + str(path))
num += 1
Have you checked the documentation and your project config, to see whether your IDE is using and managing a virtual environment for the code? If it is, you should use the IDE’s tools to install packages into that virtual environment.
Are you sure it’s Visual Studio, and not Visual Studio Code (completely different product, much more commonly used for languages that aren’t C, C++ or C#)?