question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Requests dependency 'urllib3' must be version >= 1.21.1, < 1.22!

See original GitHub issue

Description

Outline the issue here:

victor:ASQ Victor$ az login -u *********** -p **********
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/azure/cli/__main__.py", line 23, in <module>
    exit_code = azure.cli.main.main(args)
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/azure/cli/main.py", line 52, in main
    error_code = handle_exception(ex)
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/azure/cli/core/util.py", line 34, in handle_exception
    from msrestazure.azure_exceptions import CloudError
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/msrestazure/__init__.py", line 28, in <module>
    from .azure_configuration import AzureConfiguration
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/msrestazure/azure_configuration.py", line 33, in <module>
    from msrest import Configuration
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/msrest/__init__.py", line 27, in <module>
    from .configuration import Configuration
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/msrest/configuration.py", line 36, in <module>
    import requests
  File "/Users/Victor/lib/azure-cli/lib/python2.7/site-packages/requests/__init__.py", line 61, in <module>
    raise RuntimeError('Requests dependency \'urllib3\' must be version >= 1.21.1, < 1.22!')
RuntimeError: Requests dependency 'urllib3' must be version >= 1.21.1, < 1.22!

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: curl -L https://aka.ms/InstallAzureCli | bash

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here: 2.0.6

OS Version: What OS and version are you using?
Answer here: macOS Sierra 10.12.5

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: bash

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
miclicommented, May 31, 2017

@Xurma2 I have been found resolve steps:

  1. jump into <azure cli installation folder>/azure-cli/lib/python2.7
  2. pip install urllib3 If it still doesn’t work, the reason is that the python you are running is not under azure-cli folder. It might be located at: /usr/local/lib/python2.7 In this situation, you have to copy urllib3 manually, like this:
  3. cd /usr/local/lib/python2.7/site-packages
  4. ls (to confirm urllib3 already exists. If not, please run “pip install urllib3”)
  5. cp urllib3 <azure cli installation folder>/azure-cli/lib/python2.7/site-packages/

When done above, you will run az login correctly.

3reactions
yugangw-msftcommented, May 30, 2017

Fixed, and we will release at some time this afternon

Read more comments on GitHub >

github_iconTop Results From Across the Web

Requests dependency 'urllib3' must be version >= 1.21.1 ...
On Mac try this: sudo pip install urllib3==1.23 then sudo pip install requests.
Read more >
urllib3 issue - Google Groups
Unexpected Exception, this is probably a bug: Requests dependency 'urllib3' must be version >= 1.21.1, < 1.22! Some servers running exactly the same...
Read more >
urllib3 1.2.1 - PyPI
Small and easy to understand codebase perfect for extending and building upon. For a more comprehensive solution, have a look at Requests which...
Read more >
RunTime error when installing package on raspberry pi
I was unable to install a version of urllib3 later than 1.9 through apt-get, ... I then got an error message about problems...
Read more >
How to Fix the RequestsDependencyWarning Elasticsearch ...
This tutorial will cover how to fix the requests dependency ... in a terminal window to install version 1.21.1 of the urllib3 package: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found