Skip to content

Upgrade pip to a newer version when install via curl to support Python 3.8 #11344

@MrStrik3

Description

@MrStrik3

Describe the bug
The installation of azure-cli with python 3.8 doesn't work anymore. The installation uses the attribute "linux_distribution" of the module platform and linux_distribution has been marked as deprecated since python 3.5 and has been remove in python 3.8.

To Reproduce
(needs python 3.8 installed as default python)
curl -L https://aka.ms/InstallAzureCli | bash

Expected behavior
Should install, get this instead
➜ azure-cli curl -L https://aka.ms/InstallAzureCli | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 1369 100 1369 0 0 1444 0 --:--:-- --:--:-- --:--:-- 3048
Downloading Azure CLI install script from https://azurecliprod.blob.core.windows.net/install.py to /tmp/azure_cli_install_tmp_jJk8ou.
######################################################################## 100.0%
/tmp/azure_cli_install_tmp_jJk8ou: OK
Running install script.
-- Verifying Python version.
-- Python version 3.8.0 okay.
Traceback (most recent call last):
File "/tmp/azure_cli_install_tmp_jJk8ou", line 370, in
main()
File "/tmp/azure_cli_install_tmp_jJk8ou", line 349, in main
verify_native_dependencies()
File "/tmp/azure_cli_install_tmp_jJk8ou", line 309, in verify_native_dependencies
distname, version, _ = platform.linux_distribution()
AttributeError: module 'platform' has no attribute 'linux_distribution'

Environment summary
ArchLinux, python 3.8, bash

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions