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

az keyvault show doesn't work on Ubuntu: ModuleNotFoundError: No module named 'azure.keyvault.v7_0' #13101

Closed
JoranDox opened this issue Apr 21, 2020 · 10 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request KeyVault az keyvault
Milestone

Comments

@JoranDox
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az keyvault secret show

Errors:

No module named 'azure.keyvault.v7_0'
Traceback (most recent call last):
python3/dist-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 528, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 299, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
...
<frozen importlib._bootstrap>, ln 1014, in _gcd_import
<frozen importlib._bootstrap>, ln 991, in _find_and_load
<frozen importlib._bootstrap>, ln 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.keyvault.v7_0'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az keyvault secret show --name {} --vault-name {} --output {} --query {}

Expected Behavior

getting the requested secret instead of an error

Environment Summary

Linux-5.4.0-25-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: bash

azure-cli 2.0.81 *

Extensions:
azure-devops 0.17.0

Additional Context

@JoranDox
Copy link
Author

I reinstalled azure cli from the script instead of apt, and now it works, probably some issue with the older version still in apt.

az version now gives:
{
"azure-cli": "2.4.0",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.4.0",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {}
}

@abokov
Copy link

abokov commented May 11, 2020

Ubuntu 20.04 - still have this issue with Azure Cli from apt-get - it does install old ones
{
"azure-cli": "2.0.81",
"azure-cli-core": "2.0.81",
"azure-cli-telemetry": "1.0.4",
"extensions": {
"azure-devops": "0.17.0"
}
}

Fix with curl -L https://aka.ms/InstallAzureCli | bash ( from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest ) does help, after I got:
{
"azure-cli": "2.5.1",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.5.1",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {}
}

@JoranDox
Copy link
Author

Good point, maybe I should keep this issue open until the version in the apt repositories is updated, thanks for the heads-up.

@JoranDox JoranDox reopened this May 13, 2020
@yonzhan yonzhan added the KeyVault az keyvault label May 13, 2020
@yonzhan yonzhan added this to the S170 milestone May 13, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented May 13, 2020

@bim-msft please take a look

@bim-msft
Copy link
Contributor

@fengzhou-msft Hi, seems apt-get will install an old version (2.0.81) of CLI, and this version maybe contains some bugs. Do you know how to push them to upload our latest package? Thanks.

@bim-msft bim-msft modified the milestones: S170, Backlog Jun 10, 2020
@bim-msft
Copy link
Contributor

Waiting for apt repositories to be updated. Move this issue into the backlog.

@abokov
Copy link

abokov commented Jun 10, 2020

Just a curious about any estimations for repos being updated

@azure-sdk azure-sdk added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Sep 24, 2020
@yungezz yungezz assigned houk-ms and unassigned bim-msft Dec 22, 2020
@yungezz
Copy link
Member

yungezz commented Dec 22, 2020

hi @abokov there's issue in 2.0.81 which is in default repo of Ubuntu Focal release, detail pls see issue #14011. We have to wait for next main distro release to change CLI version in it. To resolve your issue, could you pls uninstall 2.0.81 and install latest version of Azure CLI? thanks.

@fengzhou-msft
Copy link
Member

Please follow #14011 (comment) for the fix.

@jiasli jiasli changed the title az keyvault show doesn't work on ubuntu 20.04 az keyvault show doesn't work on Ubuntu: ModuleNotFoundError: No module named 'azure.keyvault.v7_0' Jun 7, 2022
@jiasli jiasli assigned jiasli and unassigned houk-ms Jun 7, 2022
@jiasli
Copy link
Member

jiasli commented Jun 7, 2022

This is bug in the unofficial Azure CLI delivered by Ubuntu's repo. Please see #19640 and install the official Azure CLI from Microsoft Linux Repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request KeyVault az keyvault
Projects
None yet
Development

No branches or pull requests

10 participants