ImportError No module named requests

0 votes

Whenever I try to import requests, I get an error saying No module Named requests.

import requests

The error I get:

File "ex2.py", line 1, in <module>
    import requests
ImportError: No module named requests
Nov 20, 2020 in Python by kartik
• 37,520 points
842 views

1 answer to this question.

0 votes

Hello,

To install requests module for Python2:

$ sudo apt-get install python-requests

And for Python3 the command is:

$ sudo apt-get install python3-requests
answered Nov 20, 2020 by Niroj
• 82,840 points

Related Questions In Python

0 votes
1 answer

ImportError: No module named requests

Requests is not available for use by ...READ MORE

answered Jun 26, 2018 in Python by Hamartia's Mask
• 1,580 points
2,550 views
0 votes
2 answers

Python error " import requests ImportError: No module named requests"

Hello, Open Cmd or Powershell as Admin. type pip ...READ MORE

answered Nov 28, 2020 in Python by Rohan
• 200 points
17,483 views
0 votes
1 answer

ImportError: No module named requests

To install requests module on Debian/Ubuntu for Python2: $ sudo ...READ MORE

answered Sep 11, 2020 in Python by Deming
1,454 views
+3 votes
1 answer

Tensorflow 1.5 ImportError: No module named tensorflow.python.client

I think it's a bug in Tensorflow ...READ MORE

answered Sep 25, 2018 in Python by charlie_brown
• 7,720 points
6,969 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,468 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,128 views
0 votes
1 answer

ImportError: No module named pip when trying to install packages

Hello @kartik, I found that on Ubuntu, pip ...READ MORE

answered May 27, 2020 in Python by Niroj
• 82,840 points
13,895 views
0 votes
2 answers

Python error “ImportError: No module named”

use the dir() function for particular import ...READ MORE

answered Jun 6, 2020 in Python by sahil
• 500 points
16,111 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP