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

No module named azure.cli - macOS homebrew #8399

Closed
nandhak21 opened this issue Jan 31, 2019 · 7 comments
Closed

No module named azure.cli - macOS homebrew #8399

nandhak21 opened this issue Jan 31, 2019 · 7 comments

Comments

@nandhak21
Copy link


Environment summary

Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Tried both pip and brew methods.
Able to access azure-cli programmatically but the command version seems to be having some issue.
I am assuming python2.7 builtin mac is causing some issue but not able to make a reference for az to use.
OS version - mac os High Sierra
Shell Type - Bash

Went through other posts as well. It was quiet complex to understand and would really appreciate if anyone is able to help me on this.

I have also tried using instructions from azure documentation.

Both python2.7 and python3.6 has been installed in my mac. And tried reinstalling azure-cli in both brew and pip.

$ az
/usr/bin/python: No module named azure

@marstr
Copy link
Member

marstr commented Jan 31, 2019

Howdy @nandhak21,

While I don't run into quite the same error, I'm essentially able to repro this. Except, on my machine (macOS 10.14.2) it is missing azure.mgmt.kusto. I'm investigating now.

@marstr
Copy link
Member

marstr commented Jan 31, 2019

I've confirmed with @tjprescott that this is the result of missing dependencies in the install_requirements portion of our setup.py. This bug will impact anyone install from pip, which includes brew users. However, it shows itself somewhat differently with pip direct users just not getting certain commands. I'm working on publishing a hot-fix now, which will be version 2.0.57.

@marstr
Copy link
Member

marstr commented Jan 31, 2019

For people blocked by this issue, you should still be able to install 2.0.55.
For brew users, there is a useful Stack Overflow post here: https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
Similarly pip users can use pip install -I azure-cli==2.0.55

@tjprescott
Copy link
Member

Azure CLI 2.0.57 has been released and has fixed the problem. Thanks @marstr for the quick turnaround!

@nandhak21
Copy link
Author

Thank you all for the quick fix..

@mahermassoud
Copy link

Had a similar issue, fixed it with

python -m pip install azure-cli

@pjangam
Copy link

pjangam commented Jan 27, 2020

I'm getting same error with azure-cli 2.0.80.
when I try python -m pip install azure-cli
I get below error:

ERROR: azure-cli-batchai 0.4.10 has requirement azure-mgmt-storage==3.3.0, but you'll have azure-mgmt-storage 7.1.0 which is incompatible.
ERROR: azure-cli-batchai 0.4.10 has requirement azure-storage-blob==1.3.1, but you'll have azure-storage-blob 1.5.0 which is incompatible.
ERROR: azure-cli-role 2.6.4 has requirement azure-mgmt-authorization==0.50.0, but you'll have azure-mgmt-authorization 0.52.0 which is incompatible.
ERROR: azure-cli-role 2.6.4 has requirement azure-mgmt-monitor==0.5.2, but you'll have azure-mgmt-monitor 0.7.0 which is incompatible.
ERROR: azure-cli-container 0.3.18 has requirement azure-mgmt-authorization==0.50.0, but you'll have azure-mgmt-authorization 0.52.0 which is incompatible.
ERROR: azure-cli-container 0.3.18 has requirement azure-mgmt-containerinstance==1.4.0, but you'll have azure-mgmt-containerinstance 1.5.0 which is incompatible.
ERROR: azure-cli-container 0.3.18 has requirement azure-mgmt-network==3.0.0, but you'll have azure-mgmt-network 7.0.0 which is incompatible.
ERROR: azure-cli-appservice 0.2.21 has requirement azure-mgmt-containerregistry==2.8.0, but you'll have azure-mgmt-containerregistry 3.0.0rc8 which is incompatible.
ERROR: azure-cli-appservice 0.2.21 has requirement azure-mgmt-storage==3.3.0, but you'll have azure-mgmt-storage 7.1.0 which is incompatible.

I think I'm getting this error since I tried to install azure-ml sdk from pip. Originally I had installed azure-cli from brew which was working.

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

6 participants