Skip to content

Note whether azure-cli really needs an old version of Python #2407

@nemobis

Description

@nemobis

The documentation currently states, on the python3 requirement:

The RPM package of the Azure CLI depends on the python3 package. On your system, this may be a Python version which predates the requirement of Python 3.6.x. If this affects you, find a replacement python3 package.

Following the instructions on Fedora 33, I'm prompted to install an old version of Python, 3.6:

$ LANG=en_GB sudo dnf update azure-cli 
Last metadata expiration check: 0:41:12 ago on Wed 20 Jan 2021 14:15:45 EET.
Dependencies resolved.
=============================================================================================================================================================================================
 Package                                      Architecture                              Version                                           Repository                                    Size
=============================================================================================================================================================================================
Upgrading:
 azure-cli                                    x86_64                                    2.18.0-1.el7                                      azure-cli                                     33 M
Installing dependencies:
 python3.6                                    x86_64                                    3.6.12-2.fc33                                     fedora                                        16 M

Transaction Summary
=============================================================================================================================================================================================
Install  1 Package
Upgrade  1 Package

Total download size: 50 M
Is this ok [y/N]: N
Operation aborted.
$ python3 --version
Python 3.9.1

I instead chose to ignore the python3.6 dependency and I got an older version of azure-cli instead, which states it's using Python 2.7. Is this intended?

$ sudo dnf install azure-cli -x python3.6
Ultima verifica della scadenza dei metadati: 0:02:32 fa il mer 20 gen 2021, 14:15:45.
Dipendenze risolte.

 Problema: package azure-cli-2.18.0-1.el7.x86_64 requires libpython3.6m.so.1.0()(64bit), but none of the providers can be installed
  - cannot install the best candidate for the job
  - package python3.6-3.6.12-2.fc33.x86_64 is filtered out by exclude filtering
=============================================================================================================================================================================================
 Package                                            Architecture                           Version                                           Repository                                 Size
=============================================================================================================================================================================================
Installing:
 azure-cli                                          x86_64                                 2.0.76-1.el7                                      azure-cli                                  28 M
Installazione dipendenze:
 python-wheel-wheel                                 noarch                                 1:0.34.2-1.fc33                                   fedora                                     33 k
 python3-appdirs                                    noarch                                 1.4.3-15.fc33                                     fedora                                     22 k
 python3-distlib                                    noarch                                 0.3.1-2.fc33                                      fedora                                    187 k
 python3-filelock                                   noarch                                 3.0.12-8.fc33                                     fedora                                     22 k
 python3-virtualenv                                 noarch                                 20.0.30-1.fc33                                    fedora                                    221 k
Ignoro i pacchetti con dipendenze rotte :
 azure-cli                                          x86_64                                 2.18.0-1.el7                                      azure-cli                                  33 M

Riepilogo della transazione
=============================================================================================================================================================================================
Installati  6 pacchetti
Ignorati    1 pacchetto

Dimensione totale dello scaricamento: 28 M
Dimensione installata: 29 M
Procedere [s/N]: s
Scaricamento dei pacchetti:
(1/6): python-wheel-wheel-0.34.2-1.fc33.noarch.rpm                                                                                                           992 kB/s |  33 kB     00:00    
(2/6): python3-appdirs-1.4.3-15.fc33.noarch.rpm                                                                                                              591 kB/s |  22 kB     00:00    
(3/6): python3-filelock-3.0.12-8.fc33.noarch.rpm                                                                                                             1.2 MB/s |  22 kB     00:00    
(4/6): python3-distlib-0.3.1-2.fc33.noarch.rpm                                                                                                               3.7 MB/s | 187 kB     00:00    
(5/6): python3-virtualenv-20.0.30-1.fc33.noarch.rpm                                                                                                          2.8 MB/s | 221 kB     00:00    
(6/6): azure-cli-2.0.76-1.el7.x86_64.rpm                                                                                                                     5.1 MB/s |  28 MB     00:05    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Totale                                                                                                                                                       4.7 MB/s |  28 MB     00:05     
Esecuzione del controllo di transazione
Controllo di transazione eseguito con successo.
Test di transazione in corso
Test di transazione eseguito con successo
Transazione in corso
  Preparazione in corso        :                                                                                                                                                         1/1 
  Installing                   : python3-filelock-3.0.12-8.fc33.noarch                                                                                                                   1/6 
  Installing                   : python3-distlib-0.3.1-2.fc33.noarch                                                                                                                     2/6 
  Installing                   : python3-appdirs-1.4.3-15.fc33.noarch                                                                                                                    3/6 
  Installing                   : python-wheel-wheel-1:0.34.2-1.fc33.noarch                                                                                                               4/6 
  Installing                   : python3-virtualenv-20.0.30-1.fc33.noarch                                                                                                                5/6 
  Installing                   : azure-cli-2.0.76-1.el7.x86_64                                                                                                                           6/6 
  Esecuzione scriptlet in corso: azure-cli-2.0.76-1.el7.x86_64                                                                                                                           6/6 
  Verifica in corso            : azure-cli-2.0.76-1.el7.x86_64                                                                                                                           1/6 
  Verifica in corso            : python-wheel-wheel-1:0.34.2-1.fc33.noarch                                                                                                               2/6 
  Verifica in corso            : python3-appdirs-1.4.3-15.fc33.noarch                                                                                                                    3/6 
  Verifica in corso            : python3-distlib-0.3.1-2.fc33.noarch                                                                                                                     4/6 
  Verifica in corso            : python3-filelock-3.0.12-8.fc33.noarch                                                                                                                   5/6 
  Verifica in corso            : python3-virtualenv-20.0.30-1.fc33.noarch                                                                                                                6/6 

Installati:
  azure-cli-2.0.76-1.el7.x86_64                 python-wheel-wheel-1:0.34.2-1.fc33.noarch         python3-appdirs-1.4.3-15.fc33.noarch         python3-distlib-0.3.1-2.fc33.noarch        
  python3-filelock-3.0.12-8.fc33.noarch         python3-virtualenv-20.0.30-1.fc33.noarch         

Skipped:
  azure-cli-2.18.0-1.el7.x86_64                                                                                                                                                              

Fatto!

$ az --version
azure-cli                         2.0.76

command-modules-nspkg              2.0.3
core                              2.0.76
nspkg                              3.0.4
telemetry                          1.0.4

Python location '/usr/bin/python2.7'
Extensions directory '/home/federico/.azure/cliextensions'

Python (Linux) 2.7.18 (default, Sep 30 2020, 00:00:00) 
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)]

Legal docs and information: aka.ms/AzureCliLegal


Unable to check if your CLI is up-to-date. Check your internet connection.

Dettagli del documento

Non modificare questa sezione. È necessaria per i collegamenti relativi ai problemi tra docs.microsoft.com ➟ GitHub.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions