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
cli/core/commands/__init__.py, ln 291, in load_arguments
super(AzCliCommand, self).load_arguments()
...
<frozen importlib._bootstrap>, ln 961, in _find_and_load_unlocked
<frozen importlib._bootstrap>, ln 219, in _call_with_frames_removed
<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'
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az keyvault secret show
Linux-5.4.0-29-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: zsh
azure-cli 2.0.81 *
Extensions:
azure-devops 0.17.0
@bim-msft please take a look
duplicate with https://github.com/Azure/azure-cli/issues/13457. HI @bim-msft could you check the package story? thanks
duplicate with #13457. HI @bim-msft could you check the package story? thanks
Working on this.
@mattpasco-microsoft Hi, could you upgrade your CLI to the latest version? I cannot reproduce this issue using https://shell.azure.com/
You may use curl -L https://aka.ms/InstallAzureCli | bash
to upgrade your client. Thanks.
@bim-msft looks like the pip packages got wiped. Since my azure-cli
apt package was already up to date, it didnt resolve those dependencies. It might be helpful to add something to check for the presence of those pip packages.
az keyvault secret download: error: No module named 'azure.keyvault.key_vault_id'
๏ ๏ ~ โฏ pip3 freeze | grep azure ๏ 11:04:12
azure==4.0.0
azure-ai-textanalytics==1.0.0b1
azure-appconfiguration==1.0.0
azure-applicationinsights==0.1.0
azure-batch==8.0.0
azure-cli==2.0.81
azure-cli-core==2.0.81
azure-cli-telemetry==1.0.4
azure-cognitiveservices-anomalydetector==0.2.0
azure-cognitiveservices-formrecognizer==0.1.0
azure-cognitiveservices-knowledge-qnamaker==0.1.0
azure-cognitiveservices-language-luis==0.5.0
azure-cognitiveservices-language-spellcheck==2.0.0
azure-cognitiveservices-language-textanalytics==0.2.0
azure-cognitiveservices-personalizer==0.1.0
azure-cognitiveservices-search-autosuggest==0.2.0
azure-cognitiveservices-search-customimagesearch==0.2.0
azure-cognitiveservices-search-customsearch==0.3.0
azure-cognitiveservices-search-entitysearch==2.0.0
azure-cognitiveservices-search-imagesearch==2.0.0
azure-cognitiveservices-search-newssearch==2.0.0
azure-cognitiveservices-search-videosearch==2.0.0
azure-cognitiveservices-search-visualsearch==0.2.0
azure-cognitiveservices-search-websearch==2.0.0
azure-cognitiveservices-vision-computervision==0.5.0
azure-cognitiveservices-vision-contentmoderator==1.0.0
azure-cognitiveservices-vision-customvision==1.0.0
azure-cognitiveservices-vision-face==0.4.0
azure-common==1.1.24
azure-core==1.2.2
azure-cosmos==3.1.1
azure-cosmosdb-table==1.0.6
azure-datalake-store==0.0.48
azure-devops==0.17.0
azure-eventgrid==1.3.0
azure-eventhub==5.0.0
azure-eventhub-checkpointstoreblob==1.0.0
azure-eventhub-checkpointstoreblob-aio==1.0.0
azure-functions-devops-build==0.0.22
azure-graphrbac==0.61.1
azure-identity==1.2.0
azure-keyvault==4.0.0
azure-keyvault-certificates==4.0.0
azure-keyvault-keys==4.1.0b1
azure-keyvault-secrets==4.1.0b1
azure-loganalytics==0.1.0
azure-mgmt==5.0.0a1
azure-mgmt-advisor==3.0.0
azure-mgmt-alertsmanagement==0.2.0rc2
azure-mgmt-apimanagement==0.1.0
azure-mgmt-appconfiguration==0.3.0
azure-mgmt-applicationinsights==0.2.0
azure-mgmt-appplatform==0.1.0
azure-mgmt-attestation==0.1.0
azure-mgmt-authorization==0.60.0
azure-mgmt-automation==0.1.1
azure-mgmt-azurestack==0.1.0
azure-mgmt-batch==7.0.0
azure-mgmt-billing==0.2.0
azure-mgmt-botservice==0.2.0
azure-mgmt-cdn==4.1.0rc1
azure-mgmt-cognitiveservices==5.0.0
azure-mgmt-commerce==1.0.1
azure-mgmt-compute==10.0.0
azure-mgmt-consumption==3.0.0
azure-mgmt-containerinstance==1.5.0
azure-mgmt-containerregistry==3.0.0rc8
azure-mgmt-containerservice==8.2.0
azure-mgmt-cosmosdb==0.11.0
azure-mgmt-costmanagement==0.1.0
azure-mgmt-databoxedge==0.1.0
azure-mgmt-databricks==0.1.0
azure-mgmt-datafactory==0.8.0
azure-mgmt-datalake-analytics==0.6.0
azure-mgmt-datalake-store==0.5.0
azure-mgmt-datamigration==4.0.0
azure-mgmt-datashare==0.1.0rc1
azure-mgmt-deploymentmanager==0.2.0
azure-mgmt-devspaces==0.2.0
azure-mgmt-devtestlabs==4.0.0
azure-mgmt-dns==3.0.0
azure-mgmt-documentdb==0.1.3
azure-mgmt-edgegateway==0.1.0
azure-mgmt-eventgrid==3.0.0rc4
azure-mgmt-eventhub==3.0.0
azure-mgmt-frontdoor==0.3.0
azure-mgmt-hanaonazure==0.12.0
azure-mgmt-hdinsight==1.4.0
azure-mgmt-healthcareapis==0.1.0
azure-mgmt-hybridcompute==0.1.1
azure-mgmt-imagebuilder==0.3.0
azure-mgmt-iotcentral==2.0.0
azure-mgmt-iothub==0.10.0
azure-mgmt-iothubprovisioningservices==0.2.0
azure-mgmt-keyvault==2.0.0
azure-mgmt-kusto==0.5.0
azure-mgmt-labservices==0.1.1
azure-mgmt-loganalytics==0.2.0
azure-mgmt-logic==4.0.0rc2
azure-mgmt-machinelearningcompute==0.4.1
azure-mgmt-machinelearningservices==0.1.0
azure-mgmt-maintenance==0.1.0
azure-mgmt-managedservices==1.0.0
azure-mgmt-managementgroups==0.2.0
azure-mgmt-managementpartner==0.1.1
azure-mgmt-maps==0.1.0
azure-mgmt-marketplaceordering==0.2.1
azure-mgmt-media==2.1.0
azure-mgmt-mixedreality==0.1.0
azure-mgmt-monitor==0.7.0
azure-mgmt-msi==1.0.0
azure-mgmt-netapp==0.8.0
azure-mgmt-network==9.0.0
azure-mgmt-notificationhubs==2.1.0
azure-mgmt-operationsmanagement==0.1.0
azure-mgmt-peering==0.1.0rc2
azure-mgmt-policyinsights==0.4.0
azure-mgmt-powerbidedicated==0.1.0
azure-mgmt-powerbiembedded==2.0.0
azure-mgmt-privatedns==0.1.0
azure-mgmt-rdbms==1.9.0
azure-mgmt-recoveryservices==0.4.0
azure-mgmt-recoveryservicesbackup==0.6.0
azure-mgmt-redis==7.0.0rc1
azure-mgmt-relay==0.2.0
azure-mgmt-reservations==0.7.0
azure-mgmt-resource==8.0.0
azure-mgmt-resourcegraph==2.0.0
azure-mgmt-scheduler==2.0.0
azure-mgmt-search==2.1.0
azure-mgmt-security==0.3.0
azure-mgmt-serialconsole==0.1.0
azure-mgmt-servermanager==2.0.0
azure-mgmt-servicebus==0.6.0
azure-mgmt-servicefabric==0.4.0
azure-mgmt-signalr==0.3.0
azure-mgmt-sql==0.16.0
azure-mgmt-sqlvirtualmachine==0.5.0
azure-mgmt-storage==7.1.0
azure-mgmt-storagecache==0.2.0
azure-mgmt-storagesync==0.2.0
azure-mgmt-subscription==0.5.0
azure-mgmt-timeseriesinsights==0.1.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-vmwarecloudsimple==0.2.0
azure-mgmt-web==0.44.0
azure-multiapi-storage==0.2.4
azure-servicebus==0.50.2
azure-servicefabric==7.0.0.0
azure-servicemanagement-legacy==0.20.7
azure-storage-blob==1.4.0
azure-storage-common==1.4.0
azure-storage-file==1.4.0
azure-storage-file-datalake==12.0.0b7
azure-storage-file-share==12.0.1
azure-storage-queue==1.4.0
azure-template==0.0.1
msrestazure==0.6.2
@mattpasco-microsoft Have you updated azure-keyvault
manually? Azure CLI depends on 1.1.0
currently. You can use azure-keyvault==1.1.0
to solve the issue.
Forcing pip version to 1.1.0 fixed it
I repro'ed this on a clean WSL2 Ubuntu 20.04 build after installing AZ CLI with npm install azure-cli
For clarity: To fix:
REMOVE UPDATED AZURE-KEYVAULT
**pip3 uninstall azure-keyvault**
Found existing installation: azure-keyvault 4.1.0
Uninstalling azure-keyvault-4.1.0:
Would remove:
/home/[user]/.local/lib/python3.8/site-packages/azure_keyvault-4.1.0.dist-info/*
Successfully uninstalled azure-keyvault-4.1.0
INSTALL VERSION 1.1.0
**pip3 install azure-keyvault==1.1.0**
Collecting azure-keyvault==1.1.0
Downloading azure_keyvault-1.1.0-py2.py3-none-any.whl (352 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 352 kB 1.5 MB/s
Requirement already satisfied: msrest>=0.5.0 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (0.6.10)
Requirement already satisfied: cryptography>=2.1.4 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (2.8)
Collecting azure-nspkg>=2.0.0
Downloading azure_nspkg-3.0.2-py3-none-any.whl (1.5 kB)
Requirement already satisfied: msrestazure<2.0.0,>=0.4.32 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (0.6.2)
Requirement already satisfied: requests>=2.18.4 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (2.22.0)
Requirement already satisfied: azure-common~=1.1 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (1.1.24)
Installing collected packages: azure-nspkg, azure-keyvault
Successfully installed azure-keyvault-1.1.0 azure-nspkg-3.0.2
Most helpful comment
I repro'ed this on a clean WSL2 Ubuntu 20.04 build after installing AZ CLI with
npm install azure-cli
For clarity: To fix:
REMOVE UPDATED AZURE-KEYVAULT
INSTALL VERSION 1.1.0