FileNotFoundError: [WinError 2] The system cannot find the file specified cli.azure.cli.core.extension.operations: Command '['C:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe', '-m', 'pip', 'install', '--target', 'C:\\Users\\<username>\\.azure\\cliextensions\\azure-devops', 'C:\\Users\\<USER>~1\\AppData\\Local\\Temp\\tmp1za2fguz\\azure_devops-1.0.1-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1. #29981
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
DevOps
Service Attention
This issue is responsible by Azure service team.
Similar-Issue
Describe the bug
While installing the azure-devops extension I receive the following error:
Error An error occurred. Pip failed with status code 1. Use --debug for more information.
More details in the error log
Thanks!
Related command
az extension add -n azure-devops --debug
Errors
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.
FileNotFoundError: [WinError 2] The system cannot find the file specified
Issue script & Debug output
cli.knack.cli: Command arguments: ['extension', 'add', '-n', 'azure-devops', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000002D1C52DB7E0>, <function OutputProducer.on_global_arguments at 0x000002D1C5466020>, <function CLIQuery.on_global_arguments at 0x000002D1C5493BA0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: extension 0.002 1 7
cli.azure.cli.core: Total (1) 0.002 1 7
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000002D1C76BFE20>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users<USERNAME>.azure\commands\2024-09-26.12-20-42.extension_add.1712.log'.
az_command_data_logger: command args: extension add -n {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000002D1C773C900>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000002D1C773C9A0>, <function register_cache_arguments..add_cache_arguments at 0x000002D1C773CAE0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x000002D1C773CB80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002D1C54660C0>, <function CLIQuery.handle_query_parameter at 0x000002D1C5493C40>, <function register_ids_argument..parse_ids_arguments at 0x000002D1C773CA40>]
cli.azure.cli.core.extension.operations: Default enabled including preview versions for extension installation now. Disabled in future release. Use '--allow-preview true' to enable it specifically if needed. Use '--allow-preview false' to install stable version only.
urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443
urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0
urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443
urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 4541824
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl', 'azure_devops-1.0.0-py2.py3-none-any.whl', 'azure_devops-1.0.1-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl', 'azure_devops-1.0.0-py2.py3-none-any.whl', 'azure_devops-1.0.1-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl', 'azure_devops-1.0.0-py2.py3-none-any.whl', 'azure_devops-1.0.1-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_devops-0.12.0-py2.py3-none-any.whl', 'azure_devops-0.17.0-py2.py3-none-any.whl', 'azure_devops-0.21.0-py2.py3-none-any.whl', 'azure_devops-0.26.0-py2.py3-none-any.whl', 'azure_devops-1.0.0-py2.py3-none-any.whl', 'azure_devops-1.0.1-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://github.com/Azure/azure-devops-cli-extension/releases/download/20240514.1/azure_devops-1.0.1-py2.py3-none-any.whl', 'filename': 'azure_devops-1.0.1-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.30.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': '[email protected]', 'name': 'Microsoft', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Microsoft/azure-devops-cli-extension'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'azure-devops', 'run_requires': [{'requires': ['distro (==1.3.0)', 'distro==1.3.0']}], 'summary': 'Tools for managing Azure DevOps.', 'version': '1.0.1'}, 'sha256Digest': 'f300d0288f017148514ebe6f5912aef10c7a6f29bdc0c916b922edf1d75bc7db'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://github.com/Azure/azure-devops-cli-extension/releases/download/20240514.1/azure_devops-1.0.1-py2.py3-none-any.whl to C:\Users<USERNAME>~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): github.com:443
urllib3.connectionpool: https://github.com:443 "GET /Azure/azure-devops-cli-extension/releases/download/20240514.1/azure_devops-1.0.1-py2.py3-none-any.whl HTTP/1.1" 302 0
urllib3.connectionpool: Starting new HTTPS connection (1): objects.githubusercontent.com:443
urllib3.connectionpool: https://objects.githubusercontent.com:443 "GET /github-production-release-asset-2e65be/107708057/77ec1ba4-6f10-4d2b-bb30-9c1d420c4fbc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240926%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240926T102045Z&X-Amz-Expires=300&X-Amz-Signature=b9e420a2bbdc2fbcb6735516ecf6869b469d415e7c162c2b50dcb9dd364e1e5a&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dazure_devops-1.0.1-py2.py3-none-any.whl&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1195727
cli.azure.cli.core.extension.operations: Downloaded to C:\Users<USERNAME>~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension C:\Users<USERNAME>~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of C:\Users<USERNAME>~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on C:\Users<USERNAME>~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', 'C:\Users\\.azure\cliextensions\azure-devops', 'C:\Users\~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\\.azure\cliextensions\azure-devops', 'C:\Users\~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_main.py", line 24, in
sys.exit(_main())
^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\cli\main.py", line 65, in main
cmd_name, cmd_args = parse_command(args)
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\cli\main_parser.py", line 79, in parse_command
general_options, args_else = parser.parse_args(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "optparse.py", line 1371, in parse_args
values = self.get_default_values()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\cli\parser.py", line 279, in get_default_values
self.config.load()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\configuration.py", line 124, in load
self._load_config_files()
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\configuration.py", line 246, in _load_config_files
config_files = dict(self.iter_config_files())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\configuration.py", line 339, in iter_config_files
config_files = get_configuration_files()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\configuration.py", line 70, in get_configuration_files
os.path.join(path, CONFIG_BASENAME) for path in appdirs.site_config_dirs("pip")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_internal\utils\appdirs.py", line 47, in site_config_dirs
dirval = appdirs.site_config_dir(appname, appauthor=False, multipath=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_vendor\platformdirs_init.py", line 142, in site_config_dir
).site_config_dir
^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_vendor\platformdirs\windows.py", line 67, in site_config_dir
return self.site_data_dir
^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_vendor\platformdirs\windows.py", line 56, in site_data_dir
path = os.path.normpath(get_win_folder("CSIDL_COMMON_APPDATA"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\pip_vendor\platformdirs\windows.py", line 209, in get_win_folder_from_registry
directory, _ = winreg.QueryValueEx(key, shell_folder_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
cli.azure.cli.core.extension.operations: Command '['C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe', '-m', 'pip', 'install', '--target', 'C:\Users\\.azure\cliextensions\azure-devops', 'C:\Users\~1\AppData\Local\Temp\tmp1za2fguz\azure_devops-1.0.1-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 1.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users<USERNAME>.azure\cliextensions\azure-devops
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 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 733, 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 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, 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 349, in add_extension
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/operations.py", line 172, in _add_whl_ext
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 0x000002D1C76C00E0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 4.906 seconds (init: 0.195, invoke: 4.710)
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 3811 in cache file under C:\Users<USERNAME>.azure\telemetry\20240926122046896
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<USERNAME>.azure C:\Users<USERNAME>.azure\telemetry\20240926122046896"
telemetry.process: Return from creating process 13448
telemetry.main: Finish creating telemetry upload process.
Expected behavior
azure-devops extension installed successfully
Environment Summary
azure-cli 2.64.0
core 2.64.0
telemetry 1.1.0
Dependencies:
msal 1.30.0
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users<USERNAME>.azure\cliextensions'
Additional context
No response
The text was updated successfully, but these errors were encountered: