CodeSolved

Solved Programming Questions & Exercises

Modulanotfoundrror error in Python

Technical question 2038/ Download 1015 Views

In Python I will make Modunelotfoundrror error

ModuleNotFoundError: no module named 'requests'

Please guide

4 Answers

Modulanotfoundrror error occurs in Python when you try to enter a library with an import command, but Python does not find that library.

Example:

import numpy

If the library is not installed correctly, it will give it:

ModuleNotFoundError: No module named 'numpy'

Solution:

pip install numpy

To fix this error, the library mustrequestsInstall. Use the following command in the terminal or CMD:

pip install requests
Ai Download Python

Make sure that the library is installed correctly. If it is not installed, it gives an error, or when I write import requests, there is a line under requests, which means that it is not installed or not installed correctly, so first make sure that it is installed correctly. If it is installed, it gives an error again. Uninstall the library, then try again.

Amirr Download

Well there are two modes,
2) Or you didn't download this module that you should download using the following command in CMD or Terminal in Visual Studio Code:

Pip install requests 

2) There is a typical error that you have to re -type maybe you made a mistake last time !!!

Mohammad.mahdi88 Download

Submit answer

Submitting answers is currently unavailable.

×
×
Close