0

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 This is a Mac running Sierra 10.12.2.

creating build/temp.macosx-10.6-x86_64-2.7 gcc -fno-strict-aliasing -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Applications/MAMP/Library/include/python2.7 -c _scandir.c -o build/temp.macosx-10.6-x86_64-2.7/_scandir.o _scandir.c:14:10: fatal error: 'Python.h' file not found #include ^ 1 error generated. error: command 'gcc' failed with exit status 1

---------------------------------------- Failed building wheel for scandir

sea26.2
  • 376
  • 1
  • 5
  • 23
  • Azure CLI 2.0 is based on Python, could you check your python version `python --version`. If possible, could you install or re-install python? This [link](https://github.com/Azure/azure-cli/issues/1682) maybe helpful. – Shui shengbao Jun 22 '17 at 01:55
  • See https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory You need to install the python development libraries. – Clay Nov 06 '17 at 02:05
  • Alternatively, you could install it fairly easily using Homebrew (more info: https://brew.sh). – KJH Mar 30 '18 at 18:53

1 Answers1

1

Azure is based on python version 3.10

Step 1:

brew update && brew install python@3.10 && brew upgrade python@3.10
brew link --overwrite python@3.10

https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos

step2 : Install azure/cli using pip install

pip install azure-cli

https://pypi.org/project/azure-cli/#description

shajahan
  • 101
  • 1
  • 4