Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
383 stars 1.24k forks source link

az extension add --name azure-cli-ml fails on MacOS #3916

Open gary918 opened 3 years ago

gary918 commented 3 years ago

Extension name (the extension in question)

azure-cli-ml

Description of issue (in as much detail as possible)

Describe the bug

az extension add --name azure-cli-ml fails due to 'ERROR: Could not find a version that satisfies the requirement azureml-core~=1.33.0'

To reproduce

MacOS Big Sur 11.6 Python 3.9.7 pip 21.2.4

az version { "azure-cli": "2.28.0", "azure-cli-core": "2.28.0", "azure-cli-telemetry": "1.0.6", "extensions": {} }

az extension add --name azure-cli-ml --debug ... INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of azure-cli-ml to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement azureml-core~=1.33.0 (from azureml-cli-common) (from versions: 0.1.50, 0.1.57, 0.1.58, 0.1.59, 0.1.65, 0.1.68, 0.1.74, 0.1.80, 1.0rc83, 1.0rc85, 1.0.2, 1.0.6, 1.0.8, 1.0.10, 1.0.15, 1.0.17, 1.0.17.1, 1.0.18, 1.0.21, 1.0.23, 1.0.30, 1.0.33, 1.0.33.1, 1.0.39, 1.0.41, 1.0.41.1, 1.0.43, 1.0.43.1, 1.0.45, 1.0.48, 1.0.53, 1.0.55, 1.0.57, 1.0.57.1, 1.0.60, 1.0.62, 1.0.62.1, 1.0.65, 1.0.65.1, 1.0.69, 1.0.72, 1.0.74, 1.0.76, 1.0.76.1, 1.0.79, 1.0.81, 1.0.81.1, 1.0.83, 1.0.85, 1.0.85.1, 1.0.85.2, 1.0.85.3, 1.0.85.4, 1.0.85.5, 1.0.85.6, 1.1.0rc0, 1.1.1rc0, 1.1.1.1rc0, 1.1.1.2rc0, 1.1.2rc0, 1.1.5, 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.5.6, 1.1.5.7) ERROR: No matching distribution found for azureml-core~=1.33.0 Exception information: Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 376, in resolve raise ResolutionImpossible(causes) pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('azureml-core~=1.33.0'), parent=LinkCandidate('https://files.pythonhosted.org/packages/de/98/cbc12fb02ab75853d71fb32a0228b7476e6a58b2616cf66124cc15dfe6b0/azureml_cli_common-1.33.0-py3-none-any.whl#sha256=81083e2e7587b14338516db23c4fb95674640fd991a7e405149e9228b4e8bb7e (from https://pypi.org/simple/azureml-cli-common/) (requires-python:>=3.6,<4)'))]

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main status = self.run(options, args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper return func(self, options, args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 315, in run requirement_set = resolver.resolve( File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 103, in resolve raise error from e pip._internal.exceptions.DistributionNotFound: No matching distribution found for azureml-core~=1.33.0 Removed build tracker: '/private/var/folders/s8/2d_3kcgx33bd2qt_gv_r13s00000gn/T/pip-req-tracker-3pavh1nl'

cli.azure.cli.core.extension.operations: Command '['/usr/local/Cellar/azure-cli/2.28.0/libexec/bin/python', '-m', 'pip', 'install', '--target', '/Users/wanggang/.azure/cliextensions/azure-cli-ml', '/var/folders/s8/2d_3kcgx33bd2qt_gv_r13s00000gn/T/tmpr8x8a0r6/azure_cli_ml-1.33.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1. cli.azure.cli.core.extension._homebrew_patch: Homebrew patch: Deleting the temporarily created /Users/wanggang/.pydistutils.cfg cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at /Users/wanggang/.azure/cliextensions/azure-cli-ml cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. You may try to delete it manually. cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 657, in execute raise ex File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 720, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 691, in _run_job result = cmd_copy(params) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 328, in call return self.handler(*args, kwargs) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(command_args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd return add_extension(cli_ctx=cmd.cli_ctx, source=source, extension_name=extension_name, index_url=index_url, File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/extension/operations.py", line 339, in add_extension extension_name = _add_whl_ext(cli_ctx=cmd_cli_ctx, source=source, ext_sha256=ext_sha256, File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/extension/operations.py", line 173, in _add_whl_ext raise CLIError('An error occurred. Pip failed with status code {}. ' knack.util.CLIError: An error occurred. Pip failed with status code 1. Use --debug for more information.

cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 1. Use --debug for more information. az_command_data_logger: An error occurred. Pip failed with status code 1. Use --debug for more information. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x10717ef70>] az_command_data_logger: exit code: 1 cli.main: Command ran in 15.454 seconds (init: 0.161, invoke: 15.292) telemetry.save: Save telemetry record of length 3085 in cache telemetry.check: Negative: The /Users/wanggang/.azure/telemetry.txt was modified at 2021-09-26 10:30:14.500079, which in less than 600.000000 s


ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.

Issue Details
### Extension name (the extension in question) azure-cli-ml ### Description of issue (in as much detail as possible) #### Describe the bug az extension add --name azure-cli-ml fails due to 'ERROR: Could not find a version that satisfies the requirement azureml-core~=1.33.0' #### To reproduce MacOS Big Sur 11.6 Python 3.9.7 pip 21.2.4 az version { "azure-cli": "2.28.0", "azure-cli-core": "2.28.0", "azure-cli-telemetry": "1.0.6", "extensions": {} } az extension add --name azure-cli-ml --debug ... INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of azure-cli-ml to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement azureml-core~=1.33.0 (from azureml-cli-common) (from versions: 0.1.50, 0.1.57, 0.1.58, 0.1.59, 0.1.65, 0.1.68, 0.1.74, 0.1.80, 1.0rc83, 1.0rc85, 1.0.2, 1.0.6, 1.0.8, 1.0.10, 1.0.15, 1.0.17, 1.0.17.1, 1.0.18, 1.0.21, 1.0.23, 1.0.30, 1.0.33, 1.0.33.1, 1.0.39, 1.0.41, 1.0.41.1, 1.0.43, 1.0.43.1, 1.0.45, 1.0.48, 1.0.53, 1.0.55, 1.0.57, 1.0.57.1, 1.0.60, 1.0.62, 1.0.62.1, 1.0.65, 1.0.65.1, 1.0.69, 1.0.72, 1.0.74, 1.0.76, 1.0.76.1, 1.0.79, 1.0.81, 1.0.81.1, 1.0.83, 1.0.85, 1.0.85.1, 1.0.85.2, 1.0.85.3, 1.0.85.4, 1.0.85.5, 1.0.85.6, 1.1.0rc0, 1.1.1rc0, 1.1.1.1rc0, 1.1.1.2rc0, 1.1.2rc0, 1.1.5, 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.5.6, 1.1.5.7) ERROR: No matching distribution found for azureml-core~=1.33.0 Exception information: Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 376, in resolve raise ResolutionImpossible(causes) pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('azureml-core~=1.33.0'), parent=LinkCandidate('https://files.pythonhosted.org/packages/de/98/cbc12fb02ab75853d71fb32a0228b7476e6a58b2616cf66124cc15dfe6b0/azureml_cli_common-1.33.0-py3-none-any.whl#sha256=81083e2e7587b14338516db23c4fb95674640fd991a7e405149e9228b4e8bb7e (from https://pypi.org/simple/azureml-cli-common/) (requires-python:>=3.6,<4)'))] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main status = self.run(options, args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper return func(self, options, args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 315, in run requirement_set = resolver.resolve( File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 103, in resolve raise error from e pip._internal.exceptions.DistributionNotFound: No matching distribution found for azureml-core~=1.33.0 Removed build tracker: '/private/var/folders/s8/2d_3kcgx33bd2qt_gv_r13s00000gn/T/pip-req-tracker-3pavh1nl' cli.azure.cli.core.extension.operations: Command '['/usr/local/Cellar/azure-cli/2.28.0/libexec/bin/python', '-m', 'pip', 'install', '--target', '/Users/wanggang/.azure/cliextensions/azure-cli-ml', '/var/folders/s8/2d_3kcgx33bd2qt_gv_r13s00000gn/T/tmpr8x8a0r6/azure_cli_ml-1.33.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1. cli.azure.cli.core.extension._homebrew_patch: Homebrew patch: Deleting the temporarily created /Users/wanggang/.pydistutils.cfg cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at /Users/wanggang/.azure/cliextensions/azure-cli-ml cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. Retrying ... cli.azure.cli.core.util: Failed to delete '/Users/wanggang/.azure/cliextensions/azure-cli-ml': [Errno 2] No such file or directory: '/Users/wanggang/.azure/cliextensions/azure-cli-ml'. You may try to delete it manually. cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke cmd_result = self.invocation.execute(args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute raise ex File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job result = cmd_copy(params) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__ return self.handler(*args, **kwargs) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd return add_extension(cli_ctx=cmd.cli_ctx, source=source, extension_name=extension_name, index_url=index_url, File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/extension/operations.py", line 339, in add_extension extension_name = _add_whl_ext(cli_ctx=cmd_cli_ctx, source=source, ext_sha256=ext_sha256, File "/usr/local/Cellar/azure-cli/2.28.0/libexec/lib/python3.9/site-packages/azure/cli/core/extension/operations.py", line 173, in _add_whl_ext raise CLIError('An error occurred. Pip failed with status code {}. ' knack.util.CLIError: An error occurred. Pip failed with status code 1. Use --debug for more information. cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 1. Use --debug for more information. az_command_data_logger: An error occurred. Pip failed with status code 1. Use --debug for more information. cli.knack.cli: Event: Cli.PostExecute [] az_command_data_logger: exit code: 1 cli.__main__: Command ran in 15.454 seconds (init: 0.161, invoke: 15.292) telemetry.save: Save telemetry record of length 3085 in cache telemetry.check: Negative: The /Users/wanggang/.azure/telemetry.txt was modified at 2021-09-26 10:30:14.500079, which in less than 600.000000 s -----
Author: gary918
Assignees: -
Labels: `customer-reported`, `Machine Learning`, `Service Attention`
Milestone: -
yonzhan commented 3 years ago

route to service team

diondrapeck commented 3 years ago

Hi @gary918 - I wasn't able to reproduce. Is this your first time trying to add this extension? Could you please try removing it and then adding again: https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview#how-to-uninstall-extensions

luigiw commented 3 years ago

Can this be be caused by azureml-core not officially supporting python 3.9 yet? Can you try using python 3.8? @gary918

gary918 commented 3 years ago

Hi @gary918 - I wasn't able to reproduce. Is this your first time trying to add this extension? Could you please try removing it and then adding again: https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview#how-to-uninstall-extensions

Yes. It's my first time to install this extension on this MacBook. However, I've successfully installed azure iot extension and azure databricks extension. I've tried to remove it and reinstall ... still the same issue.

gary918 commented 3 years ago

Can this be be caused by azureml-core not officially supporting python 3.9 yet? Can you try using python 3.8? @gary918

Hi, @luigiw , I've tried Python 3.8.5, that issue is still there.

Mossaka commented 3 years ago

It looks like pip was not able to find azureml-core=1.33.0 and beyond from this error message

ERROR: Could not find a version that satisfies the requirement azureml-core~=1.33.0 (from azureml-cli-common) (from versions: 0.1.50, 0.1.57, 0.1.58, 0.1.59, 0.1.65, 0.1.68, 0.1.74, 0.1.80, 1.0rc83, 1.0rc85, 1.0.2, 1.0.6, 1.0.8, 1.0.10, 1.0.15, 1.0.17, 1.0.17.1, 1.0.18, 1.0.21, 1.0.23, 1.0.30, 1.0.33, 1.0.33.1, 1.0.39, 1.0.41, 1.0.41.1, 1.0.43, 1.0.43.1, 1.0.45, 1.0.48, 1.0.53, 1.0.55, 1.0.57, 1.0.57.1, 1.0.60, 1.0.62, 1.0.62.1, 1.0.65, 1.0.65.1, 1.0.69, 1.0.72, 1.0.74, 1.0.76, 1.0.76.1, 1.0.79, 1.0.81, 1.0.81.1, 1.0.83, 1.0.85, 1.0.85.1, 1.0.85.2, 1.0.85.3, 1.0.85.4, 1.0.85.5, 1.0.85.6, 1.1.0rc0, 1.1.1rc0, 1.1.1.1rc0, 1.1.1.2rc0, 1.1.2rc0, 1.1.5, 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.5.6, 1.1.5.7)
ERROR: No matching distribution found for azureml-core~=1.33.0

Could you please manually install azureml-core=1.33.0 by running pip install azureml-core=1.33.0?

gary918 commented 3 years ago

@Mossaka , thanks for your reply. Here's what I got when running pip install azureml-core==1.33.0

ERROR: Could not find a version that satisfies the requirement azureml-core==1.33.0 (from versions: 0.1.50, 0.1.57, 0.1.58, 0.1.59, 0.1.65, 0.1.68, 0.1.74, 0.1.80, 1.0rc83, 1.0rc85, 1.0.2, 1.0.6, 1.0.8, 1.0.10, 1.0.15, 1.0.17, 1.0.17.1, 1.0.18, 1.0.21, 1.0.23, 1.0.30, 1.0.33, 1.0.33.1, 1.0.39, 1.0.41, 1.0.41.1, 1.0.43, 1.0.43.1, 1.0.45, 1.0.48, 1.0.53, 1.0.55, 1.0.57, 1.0.57.1, 1.0.60, 1.0.62, 1.0.62.1, 1.0.65, 1.0.65.1, 1.0.69, 1.0.72, 1.0.74, 1.0.76, 1.0.76.1, 1.0.79, 1.0.81, 1.0.81.1, 1.0.83, 1.0.85, 1.0.85.1, 1.0.85.2, 1.0.85.3, 1.0.85.4, 1.0.85.5, 1.0.85.6, 1.1.0rc0, 1.1.1rc0, 1.1.1.1rc0, 1.1.1.2rc0, 1.1.2rc0, 1.1.5, 1.1.5.1, 1.1.5.2, 1.1.5.3, 1.1.5.4, 1.1.5.5, 1.1.5.6, 1.1.5.7)
ERROR: No matching distribution found for azureml-core==1.33.0
Mossaka commented 3 years ago

@gary918 I think your pip index is not pointing to Public PyPi. The newest version of azureml-core in Pypi is 1.34.0: https://pypi.org/project/azureml-core/

Can you check out this installation guide? https://packaging.python.org/tutorials/installing-packages/

gary918 commented 3 years ago

Thanks for your suggestion, @Mossaka. I've tried re-creating new conda env and upgrade the pip, but I'm still having the error. BTW, az extension add --name azure-iotworks just fine.

suresh88 commented 2 years ago

I am facing the similar error on Ubuntu. The 'azure-cli-ml' extension version 1.33.1 is not compatible with your current CLI core version 2.31.0. This extension requires a min of 2.3.1 and max of 2.29.2 CLI core. Please run 'az upgrade' to upgrade to a compatible version. 'ml' is misspelled or not recognized by the system.

How to fix this?

DamianBorndorff commented 2 years ago

@suresh88 thank you for the info that the max version is 2.29.2. Could you please give me a hint where to find this information?

For your problem: try to execute az extension add -n ml -y