ImportError: No module named 'requests.packages.urllib3'

teqisid at teqisid at
Wed Apr 1 18:43:55 CEST 2015

On Wednesday, April 1, 2015 at 12:42:39 PM UTC-4, teq... at wrote:
> On Wednesday, April 1, 2015 at 12:05:12 PM UTC-4, Ian wrote:
> > On Wed, Apr 1, 2015 at 9:46 AM,  <teqisid at> wrote:
> > > When I am trying to import requests library in python shell, I get this error: ImportError: No module named 'requests.packages.urllib3'
> > > I have tried searching online and followed a few probable solutions but yet no luck.
> > > Does anyone know how I can solve this error?
> > > I am using python 2.7
> > 
> > It sounds like there's something missing from your requests
> > installation. How did you attempt to install it, and were there any
> > errors?
> I installed it using pip. I had to use sudo pip install requests to get the module in the site-packages directory. I did not see any error.

Below is the full stack trace for the error:

Traceback (most recent call last):
  File "/usr/local/bin/behave", line 8, in <module>
    load_entry_point('behave==1.2.4', 'console_scripts', 'behave')()
  File "build/bdist.macosx-10.9-intel/egg/behave/", line 111, in main
  File "build/bdist.macosx-10.9-intel/egg/behave/", line 659, in run
  File "build/bdist.macosx-10.9-intel/egg/behave/", line 665, in run_with_paths
  File "build/bdist.macosx-10.9-intel/egg/behave/", line 649, in load_step_definitions
  File "build/bdist.macosx-10.9-intel/egg/behave/", line 306, in exec_file
  File "/Users/abubakar.siddiq/projects/oms_automation_test/features/steps/", line 2, in <module>
    import requests
  File "/Library/Python/2.7/site-packages/requests/", line 58, in <module>
    from . import utils
  File "/Library/Python/2.7/site-packages/requests/", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/Library/Python/2.7/site-packages/requests/", line 42, in <module>
    from .packages.urllib3.packages.ordered_dict import OrderedDict
  File "/Library/Python/2.7/site-packages/requests/packages/", line 95, in load_module
    raise ImportError("No module named '%s'" % (name,))
ImportError: No module named 'requests.packages.urllib3'

More information about the Python-list mailing list