No module named urllib3

0 votes
The following is a script to call an API. But I am getting the following error message while running it:

Traceback (most recent call last):
  File "user_audit.py", line 2, in <module>
    import requests
  File "c:\Python27\lib\site-packages\requests\__init__.py", line 60, in <module>
    from .packages.urllib3.exceptions import DependencyWarning
  File "c:\Python27\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
    import urllib3
ImportError: No module named urllib3
 

I've confirmed that packages is up to date, tried uninstalling and reinstalling it, but nothing has worked so far. Can someone help?
Jan 24, 2019 in Python by ana1504.k
• 7,890 points
2,434 views

1 answer to this question.

0 votes

It is possible that either urllib3 is not imported or not installed.

Now, to import ,write import urllib3 at the top of the file to install write pip install urllib3 into terminal. you may not activate environment variable correctly. to activate environment variable , write source env/bin/activate into terminal. here env is environment variable name.

Hope this helps!

answered Jan 24, 2019 by SDeb
• 13,230 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
992 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,740 points
3,820 views
0 votes
1 answer

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

Some of the modules have changed in ...READ MORE

answered Oct 5, 2018 in Python by Priyaj
• 57,510 points
832 views
0 votes
1 answer

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

Some of the modules have changed in ...READ MORE

answered Oct 9, 2018 in Python by Priyaj
• 57,510 points
152 views
0 votes
1 answer
+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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 558 views
0 votes
0 answers
0 votes
1 answer

No module named __future__

In your /PATH/Python-2.7.x/Lib should be all your ...READ MORE

answered Mar 7, 2019 in Python by SDeb
• 13,230 points
409 views
0 votes
1 answer

Difference between module and Package in Python

A module is basically a single file ...READ MORE

answered Nov 13, 2018 in Python by SDeb
• 13,230 points
212 views