az ml not a valid command in bash and powershell on azure cli in portal
See original GitHub issueTried executing: az ml account experimentation create -n jps00001 -g MyResourceGroup Error: az: error: argument _command_package: invalid choice: ml
Environment summary
az --version in BASH on azure portal:
jim@Azure:~$ az --version azure-cli (2.0.23)
acr (2.0.17) acs (2.0.22) advisor (0.1.0) appservice (0.1.22) backup (1.0.3) batch (3.1.7) batchai (0.1.3) billing (0.1.6) cdn (0.0.10) cloud (2.0.10) cognitiveservices (0.1.9) command-modules-nspkg (2.0.1) configure (2.0.12) consumption (0.2.0) container (0.1.15) core (2.0.23) cosmosdb (0.1.15) dla (0.0.15) dls (0.0.18) eventgrid (0.1.5) extension (0.0.6) feedback (2.0.6) find (0.2.7) interactive (0.3.11) iot (0.1.15) keyvault (2.0.15) lab (0.0.13) monitor (0.0.13) network (2.0.19) nspkg (3.0.1) profile (2.0.16) rdbms (0.0.9) redis (0.2.10) reservations (0.1.0) resource (2.0.19) role (2.0.15) servicefabric (0.0.7) sql (2.0.17) storage (2.0.21) vm (2.0.20)
Python location ‘/opt/az/bin/python3’ Extensions directory ‘/home/jim/.azure/cliextensions’
Python (Linux) 3.6.1 (default, Dec 15 2017, 17:51:12) [GCC 4.8.4]
Legal docs and information: aka.ms/AzureCliLegal
az --version PowerShell in Azure:
Azure:> az --version azure-cli (2.0.22)
acr (2.0.16) acs (2.0.21) advisor (0.1.0) appservice (0.1.21) backup (1.0.3) batch (3.1.7) batchai (0.1.3) billing (0.1.6) cdn (0.0.10) cloud (2.0.10) cognitiveservices (0.1.9) command-modules-nspkg (2.0.1) configure (2.0.12) consumption (0.2.0) container (0.1.14) core (2.0.22) cosmosdb (0.1.15) dla (0.0.15) dls (0.0.18) eventgrid (0.1.5) extension (0.0.6) feedback (2.0.6) find (0.2.7) interactive (0.3.11) iot (0.1.14) keyvault (2.0.14) lab (0.0.13) monitor (0.0.13) network (2.0.18) nspkg (3.0.1) profile (2.0.15) rdbms (0.0.9) redis (0.2.10) reservations (0.1.0) resource (2.0.19) role (2.0.15) servicefabric (0.0.6) sql (2.0.16) storage (2.0.20) vm (2.0.19)
Python location ‘C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe’ Extensions directory ‘C:\Users\ContainerAdministrator\CloudDrive.pscloudshell.azure\cliextensions’
Python (Windows) 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Shell Type Azure portal bash and PowerShell on Azure, both same result
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (9 by maintainers)
Top GitHub Comments
I had this same problem and in my case the issue was that pip installed
azure-cli-ml
to a location that wasn’t looked at when executing the system defaultpython
.You could either fix the python / pip installation so that both point to the same location or check which python pip uses and then explicitly load the module with that python binary. For example:
You can see how
az
loads the module with something likecat $(which az)
.I also noticed that just doing
pip install azure-cli-ml
might result into version compatibility issues. Getting tested versions can be done with: