Site icon 峰哥分享

az command stop working

/usr/local/bin/az: line 6: python3: command not found


Haven't used az command for a while.
I recently migrated from azure container instance to azure linux VM. Because I have mysql and azure file as docker volume separately, migration is too simple. It's all about a command to start a new docker container. 
Now I am going to stop the old container instance. 
Then my az command gave me above error.
The solution is reinstalling python

fengnz@mac:~/Downloads > brew uninstall –ignore-dependencies python

Uninstalling /usr/local/Cellar/python/2.7.13... (6,336 files, 86.6MB)

python 3.6.4_2 1 is still installed.

Remove all versions with `brew uninstall –force python`.

fengnz@mac:~/Downloads > brew update && brew install python

Updated 1 tap (homebrew/core).

==> Updated Formulae

After above two commands. 
My Az command is back

fengnz@mac:~/Downloads > az

Welcome to Azure CLI!

———————

Use `az -h` to see available commands or go to https://aka.ms/cli.

Telemetry

———

The Azure CLI collects usage data in order to improve your experience.

The data is anonymous and does not include commandline argument values.

The data is collected by Microsoft.

You can change your telemetry settings with `az configure`.

     /

    /      _____   _ _  ___ _

   / /   |_  / | | | '__/ _

  / ____   / /| |_| | | |  __/

 /_/    _/___|__,_|_|  ___|

az login 
then 

az container delete –name wp  –resource-group wpaci

say goodbye to my container instance. I can create it back in seconds if needed.
Feng
Exit mobile version