Wednesday 13 March 2024

python error ModuleNotFoundError: No module named 'requests'

 

Python error 

line 1, in <module>

    import requests

ModuleNotFoundError: No module named 'requests'


Solution:

Install requests via pip


C:\Users\User>pip install requests

Collecting requests

  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)



Still get the error after installation?

If you are using soemthing like pyCharm you would have to close and restart

It scans and reads install packages on restart

Do the same if you see the error on other modules like scrapy and pandas



No comments:

Post a Comment

Word Press Multisite on AWS instance cannot login with default password

  Word Press Multisite on AWS instance cannot login with default password after setting a static IP ? Try this Login to the shell from AWS i...