-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az failed to install ml #29892
Comments
Hi @muntherAnati, 2.51.0 is not the latest Azure CLI(2.64.0). If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli. |
Thank you for opening this issue, we will look into it. |
Here are some similar issues that might help you. Please check if they can solve your problem. |
Having the same issue. Worked fine until today |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github. |
I can't repro now, I think it's already been fixed? |
The issue has been resolved now, thanks all. |
Describe the bug
I have an issue installing the ML extension in Azure Pipeline. It seems there is an error with pip inside the extension. I'm trying to install the ML extension, but I haven't set up any specific Python package versions since I don't need them. and it was working correctly before 11/09/2024
Related command
az extension add --name ml
Errors
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
Issue script & Debug output
Skipping link: not a file: https://pypi.org/simple/pyasn1-modules/
Given no hashes to check 21 links for project 'pyasn1-modules': discarding no candidates
Collecting pyasn1-modules>=0.2.1 (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0)
Created temporary directory: C:\Users\v-muanati\AppData\Local\Temp\pip-unpack-439cbr19
https://files.pythonhosted.org:443 "GET /packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz HTTP/1.1" 200 310028
Downloading pyasn1_modules-0.4.1.tar.gz (310 kB)
-------------------------------------- 310.0/310.0 kB 4.8 MB/s eta 0:00:00
Added pyasn1-modules>=0.2.1 from https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0) to build tracker 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
Created temporary directory: C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn
Installing build dependencies: started
Running command pip subprocess to install build dependencies
Using pip 23.2.1 from C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip (python 3.10)
Collecting setuptools
Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/cb/9c/9ad11ac06b97e55ada655f8a6bea9d1d3f06e120b178cd578d80e558191d/setuptools-74.1.2-py3-none-any.whl.metadata
Using cached setuptools-74.1.2-py3-none-any.whl.metadata (6.7 kB)
Using cached setuptools-74.1.2-py3-none-any.whl (1.3 MB)
Installing collected packages: setuptools
Successfully installed setuptools-74.1.2
[notice] A new release of pip is available: 23.2.1 -> 24.2
[notice] To update, run: C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe -m pip install --upgrade pip
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Running command Getting requirements to build wheel
Getting requirements to build wheel: finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\cli\base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\cli\req_command.py", line 248, in wrapper
return func(self, options, args)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 239, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 230, in _get_updated_criteria
self._add_to_criteria(criteria, requirement, parent=candidate)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool
return bool(self._sequence)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool
return any(self)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
candidate = func()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 293, in init
super().init(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 156, in init
self.dist = self._prepare()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 538, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 653, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\operations\prepare.py", line 69, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 48, in prepare_distribution_metadata
self._install_build_reqs(finder)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 118, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\distributions\sdist.py", line 95, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_internal\utils\misc.py", line 697, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 166, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
File "importlib_init.py", line 126, in import_module
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 992, in _find_and_load_unlocked
File "", line 241, in _call_with_frames_removed
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_init.py", line 22, in
import distutils_hack.override # noqa: F401
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/override.py", line 1, in
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/init.py", line 77, in do_override
File "D:\a_work\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages_distutils_hack/init.py", line 63, in ensure_local_distutils
File "importlib_init.py", line 126, in import_module
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_distutils\core.py", line 14, in
from .config import PyPIRCCommand
File "C:\Users\v-muanati\AppData\Local\Temp\pip-build-env-tf2i8nvn\overlay\Lib\site-packages\setuptools_distutils\config.py", line 7, in
import email.message
File "email\message.py", line 15, in
File "email\utils.py", line 29, in
File "socket.py", line 51, in
ModuleNotFoundError: No module named '_socket'
Removed pyasn1-modules>=0.2.1 from https://files.pythonhosted.org/packages/1d/67/6afbf0d507f73c32d21084a79946bfcfca5fbc62a72057e9c23797a737c9/pyasn1_modules-0.4.1.tar.gz (from google-auth<3.0.dev0,>=2.14.1->google-api-core<3.0.0,>=1.0.0->opencensus<1.0.0,>=0.11.4->opencensus-ext-azure->ml==2.29.0) from build tracker 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
Removed build tracker: 'C:\Users\v-muanati\AppData\Local\Temp\pip-build-tracker-9w9n8sox'
cli.azure.cli.core.extension.operations: Command '['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\v-muanati\.azure\cliextensions\ml', 'C:\Users\V-MUAN~1\AppData\Local\Temp\tmpt833177p\ml-2.29.0-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 2.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users\v-muanati.azure\cliextensions\ml
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/extension/custom.py", line 16, in add_extension_cmd
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 344, in add_extension
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 173, in _add_whl_ext
knack.util.CLIError: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 2. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 2. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001EB9BB14550>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 90.840 seconds (init: 0.633, invoke: 90.207)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3371 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\v-muanati.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
It should not show an error
Environment Summary
Task : Azure CLI
Description : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent.
Version : 2.245.5
Author : Microsoft Corporation
Additional context
No response
The text was updated successfully, but these errors were encountered: