azure-cli not working on macOS Sierra
See original GitHub issueEnvironment summary
Install Method: sudo pip install azure-cli
CLI Version: az version doesn’t run because of error below. azure-cli 2.0.3
OS Version: macOS Sierra 10.12.4 16E195
Shell Type: Bash
Description
After a blank install either “sudo pip install azure-cli” or using “curl -L https://aka.ms/InstallAzureCli | bash” running az shows the following error:
~/Desktop: az
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/site-packages/azure/cli/__main__.py", line 9, in <module>
import azure.cli.main
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/azure/cli/main.py", line 12, in <module>
from azure.cli.core.util import (show_version_info_exit, handle_exception)
ImportError: No module named util
~/Desktop:
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Cannot install azure cli on macOS via script - virtualenv error
To install Azure CLI on MacOS, I would like to use a bash script and not a package manager like homebrew as recommend...
Read more >Install the Azure CLI on macOS - Microsoft Learn
Learn how to install and run the Azure CLI on macOS using the homebrew package manager. The Azure CLI has been tested on...
Read more >Azure-CLI 2.0 Install Fails on Mac - Stack Overflow
I've spent the last two days trying to install Azure CLI 2.0 per instructions on https://learn.microsoft.com/en-us/cli/azure/install-azure-cli ...
Read more >Azure CLI won't login on MacOS - Intellipaat Community
I have been trying to log into using MACOS but I continuously keep getting errors like this : ... can't reserve a port...
Read more >Install and Run Azure CLI on Mac | DevOps, Cloud & IT Career
Azure CLI. What is not new to me is working on Azure. And the Azure portal is a great tool, friendly, and easy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
both /usr/local/bin/az and ~/Library/azure-cli/bin/az (used a different directory as the default is polluting ~/ on macOS) show the same error.
~/Desktop: which az /usr/local/bin/az
Thanks for the comment @sasukeh. Would recommend a virtual environment as suggested or installing with
--user
.Closing issue.