Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MonikaReddy-MSFT opened this issue Jan 20, 2021 · 4 comments
Closed

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

MonikaReddy-MSFT opened this issue Jan 20, 2021 · 4 comments
Assignees
Milestone

Comments

@MonikaReddy-MSFT
Copy link
Contributor

MonikaReddy-MSFT commented Jan 20, 2021

Customer reported this issue - 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.

MicrosoftDocs/azure-docs-cli#2407

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jan 20, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jan 21, 2021
@yungezz
Copy link
Member

yungezz commented Jan 21, 2021

hi @fengzhou-msft could you pls have a look? thanks

@fengzhou-msft
Copy link
Member

The azure-cli RPM package depends on python3, the reason that it prompts you to install python 3.6 is that on Fedora 33, the repo only has python 3.6 for python 3. You can run below commands to download the azure-cli package and install with no dependency after step 1 and 2 in Install:

$ sudo dnf download azure-cli
$ sudo rpm -ivh --nodeps azure-cli-*.rpm

Without step 1 and 2 to add the microsoft repo, you will get the old CLI version from Fedora repo.

@jiasli jiasli added this to the Backlog milestone Jul 28, 2021
@jiasli jiasli assigned jiasli and unassigned fengzhou-msft Jul 28, 2021
@nemobis
Copy link

nemobis commented Dec 8, 2021

Note that on Fedora 35 the situation is different and Fedora 33 is now past EOL.

@jiasli
Copy link
Member

jiasli commented Dec 9, 2021

@nemobis, we will work on dropping Python 3.6 support in #19858.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants