pythonmodulenotfounderror

Python 3 encounters an error called ModuleNotFoundError


If I run the command:

>>>import requests

in Wing Ide.

I encounter an error:

Error: File "C:\Users\ASUS\Desktop\untitled-1.py", line 1, in import requests

builtins.ModuleNotFoundError: No module named 'requests'

So I changed the IDE to Spyder.

This time that IDE could run "requests", but my second command line I wrote >>> from bs4 import beautifulSoup

I encounter another error this time.

ModuleNotFoundError: No module named 'bs4'

Why do I get these errors?

My computer is Win 10 - i7
I have downloaded Python 3.
In my computer several architectural programs is downloaded like Autodesk Revit. I have heard that it uses Python 2. So maybe the problem is this.

But in another computer (samecoputer: Win 10- python 3).
I deleted Revit, but I still get the same error. So probably I do something wrong.

What can I do to repair this?


Solution

  • You have to install bs4 and requests. A good way to do this is to install them from the terminal.

    pip3 install beautifulsoup4
    
    pip3 install requests