importerror: no module named request – How to pip install the requests module to solve import errors?

Resolved – ImportError: No module named requests. You are getting this error because you have not installed the request module. /usr/bin/python: No module named pip on MacOS.

[Solved] – “ImportError: No module named requests”

importerror: no module named request

Troubleshooting the no module named requests error Using pip, Using MiniConda, No module named requests – even after i pip install and Warning / Errors when trying to pip install requests.

ImportError: No module named requests

If it’s Python 3, a solution would be

sudo pip3 install requests

Using Debian/Ubuntu for Python2:

$ sudo apt-get install python-requests

Python3 the command is:

Read Also:  How to Check Python Version in Windows / Linux / MacOS in CMD?

$ sudo apt-get install python3-requests

Solution 1

For Ubuntu Python2

sudo apt-get install python-requests

For Windows Python3

python3 -m pip install requests

For Ubuntu Python3

sudo apt-get install python3-requests

For Windows Python2

python -m pip install requests

Solution 2

Using Python 3.7

py -m pip install requests

Don’t Miss : python get current directory

I hope you get an idea about ImportError: No module named requests.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.