azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Requirement error for urllib3 on installation

Open ghost opened this issue 8 years ago • 7 comments

Describe the bug I get an error, requests 2.18.4 has requirement urllib3<1.23,>=1.21.1, but you'll have urllib3 1.23 which is incompatible. on installation.

To Reproduce Installing on Linux Mint, following instructions from, https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest

After, trying az login results in this warning,

/lib/azure-cli/local/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)

Expected behavior

Environment summary Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Additional context A related ticket, https://github.com/Azure/azure-cli/issues/3498, has them upgrading to solve the issue. Do I need to downgrade?

ghost avatar Jun 06 '18 18:06 ghost

This is a known issues on the request package https://github.com/requests/requests/issues/4673, CLI installers to roll out will workaround it by using urllib3 1.22. If you are on pip, make sure to do the same thing

yugangw-msft avatar Jun 07 '18 00:06 yugangw-msft

Thanks @yugangw-msft for your help. I'm not experienced with python, and I don't understand even though I specify the package version, and get confirmation of using 1.22, when I run az login, it says I'm still using 1.23. Do you have a pointer or two of what I'm doing wrong and need to do? Thank you

$: ~/.../python2.7/site-packages $ pip install urllib3==1.22
Collecting urllib3==1.22
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Installing collected packages: urllib3
Successfully installed urllib3-1.22
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$: ~/.../python2.7/site-packages $ az login
requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)

ghost avatar Jun 07 '18 03:06 ghost

@garajo how did you install the CLI at the first place, through pip, apt-get, etc?

yugangw-msft avatar Jun 07 '18 15:06 yugangw-msft

Either way, https://github.com/Azure/azure-cli/pull/6524 should workaround this issue before requests has new release to update the urllib3 version check which should happen in the next week or so.

yugangw-msft avatar Jun 07 '18 16:06 yugangw-msft

Still do not understand the work around while we wait for a new installer release. Should this have not have been tested prior to release? Did I somehow pull down a version of az that has not been tested? This is pretty sloppy.

hectoralicea avatar Jun 12 '18 16:06 hectoralicea

This should not happen with pre-built installers(windows msi, debian bundle, etc), which we make sure this issue never surfaces; rather, it only repros when you go through pip install and let it to resolve the whole dependency for you. Note, CLI is not the only party gets impacted, you can check out the root issues https://github.com/requests/requests/issues/4673

yugangw-msft avatar Jun 12 '18 17:06 yugangw-msft

Hello folks, any update on this?

I am having the same problem with AppVeyor. The log can be seen here: https://ci.appveyor.com/project/asieira/magnet-api2-sdk-python/build/1.0.136/job/3cmmr37nf0ov60v9

On June 5th I could build it successfully but after June 8th this problem begun.

ekamioka10 avatar Jun 19 '18 17:06 ekamioka10