-
Notifications
You must be signed in to change notification settings - Fork 1.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
Adding rdbms-connect fails with a pip error. #8264
Comments
Thank you for opening this issue, we will look into it. |
Same with This happens on Windows, in Ubuntu the extension can be installed |
This seems to be an issue for all extensions on python3.12 on windows 10/11 machines. |
I'm not able to repro this. what's the output of cd 'C:\Program Files\Microsoft SDKs\Azure\CLI2'
./python.exe -m pip install https://azcliprod.blob.core.windows.net/cli-extensions/rdbms_connect-1.0.7-py2.py3-none-any.whl --target ~/.azure/cliextensions/rdbms-connect I guess some dependency fails to build, which is a common issue on Windows and can't be fixed from our side. See: Azure/azure-cli#25067 (comment) |
The main problem is that an extension doesn't vendor all its dependencies. This makes it very difficult to guarantee that the extension build is reproducible, like in the case above where |
I'm glad the cause is found: @ambrahma for awareness. |
same problem on my side Getting those errors PS C:\PROJECTS\git> az extension add --name rdbms-connect --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'rdbms-connect', '--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 0x00000255B02AB2E0>, <function OutputProducer.on_global_arguments at 0x00000255B064C040>, <function CLIQuery.on_global_arguments at 0x00000255B0671440>]
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.003 1 7
cli.azure.cli.core: Total (1) 0.003 1 7
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
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 0x00000255B1171C60>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\smyuser\.azure\commands\2024-11-21.08-51-49.extension_add.31288.log'.
az_command_data_logger: command args: extension add --name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x00000255B12096C0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x00000255B1209760>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x00000255B12098A0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x00000255B1209940>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x00000255B064C0E0>, <function CLIQuery.handle_query_parameter at 0x00000255B06714E0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x00000255B1209800>]
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 4770303
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.5-py2.py3-none-any.whl', 'rdbms_connect-1.0.6-py2.py3-none-any.whl', 'rdbms_connect-1.0.7-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-0.1.0-py2.py3-none-any.whl', 'rdbms_connect-0.1.1-py2.py3-none-any.whl', 'rdbms_connect-0.1.2-py2.py3-none-any.whl', 'rdbms_connect-0.1.3-py2.py3-none-any.whl', 'rdbms_connect-0.1.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.0-py2.py3-none-any.whl', 'rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.5-py2.py3-none-any.whl', 'rdbms_connect-1.0.6-py2.py3-none-any.whl', 'rdbms_connect-1.0.7-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.5-py2.py3-none-any.whl', 'rdbms_connect-1.0.6-py2.py3-none-any.whl', 'rdbms_connect-1.0.7-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.5-py2.py3-none-any.whl', 'rdbms_connect-1.0.6-py2.py3-none-any.whl', 'rdbms_connect-1.0.7-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['rdbms_connect-1.0.1-py2.py3-none-any.whl', 'rdbms_connect-1.0.2-py2.py3-none-any.whl', 'rdbms_connect-1.0.3-py2.py3-none-any.whl', 'rdbms_connect-1.0.4-py2.py3-none-any.whl', 'rdbms_connect-1.0.5-py2.py3-none-any.whl', 'rdbms_connect-1.0.6-py2.py3-none-any.whl', 'rdbms_connect-1.0.7-py2.py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://azcliprod.blob.core.windows.net/cli-extensions/rdbms_connect-1.0.7-py2.py3-none-any.whl', 'filename': 'rdbms_connect-1.0.7-py2.py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.19.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': 'azpycli@microsoft.com', 'name': 'Microsoft Corporation', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Azure/azure-cli-extensions/tree/main/src/rdbms-connect'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'rdbms-connect', 'run_requires': [{'requires': ['mycli (~=1.27.0)', 'mycli~=1.27.0', 'pgcli (==4.0.1)', 'pgcli==4.0.1', 'psycopg2 (~=2.9.3)', 'psycopg2~=2.9.3', 'setproctitle (~=1.3.3)', 'setproctitle~=1.3.3']}], 'summary': 'Support for testing connection to Azure Database for MySQL & PostgreSQL servers.', 'version': '1.0.7'}, 'sha256Digest': 'eba997d4ad5acd0bdbb80a72281c2f56e88a09b2daa9ecc20ddaefd2586f543d'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://azcliprod.blob.core.windows.net/cli-extensions/rdbms_connect-1.0.7-py2.py3-none-any.whl to C:\Users\smyuser\AppData\Local\Temp\tmpx0c73ecj\rdbms_connect-1.0.7-py2.py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): azcliprod.blob.core.windows.net:443
urllib3.connectionpool: https://azcliprod.blob.core.windows.net:443 "GET /cli-extensions/rdbms_connect-1.0.7-py2.py3-none-any.whl HTTP/1.1" 200 13076
cli.azure.cli.core.extension.operations: Downloaded to C:\Users\smyuser\AppData\Local\Temp\tmpx0c73ecj\rdbms_connect-1.0.7-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension C:\Users\smyuser\AppData\Local\Temp\tmpx0c73ecj\rdbms_connect-1.0.7-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of C:\Users\smyuser\AppData\Local\Temp\tmpx0c73ecj\rdbms_connect-1.0.7-py2.py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on C:\Users\smyuser\AppData\Local\Temp\tmpx0c73ecj\rdbms_connect-1.0.7-py2.py3-none-any.whl
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', 'C:\\Users\\smyuser\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\smyuser\\AppData\\Local\\Temp\\tmpx0c73ecj\\rdbms_connect-1.0.7-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\\smyuser\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\smyuser\\AppData\\Local\\Temp\\tmpx0c73ecj\\rdbms_connect-1.0.7-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations:
cli.azure.cli.core.extension.operations: Command '['C:\\Program Files\\Microsoft SDKs\\Azure\\CLI2\\python.exe', '-m', 'pip', 'install', '--target', 'C:\\Users\\smyuser\\.azure\\cliextensions\\rdbms-connect', 'C:\\Users\\smyuser\\AppData\\Local\\Temp\\tmpx0c73ecj\\rdbms_connect-1.0.7-py2.py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']' returned non-zero exit status 3221225477.
cli.azure.cli.core.extension.operations: Pip failed so deleting anything we might have installed at C:\Users\smyuser\.azure\cliextensions\rdbms-connect
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 343, 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 3221225477. Use --debug for more information.
cli.azure.cli.core.azclierror: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
az_command_data_logger: An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x00000255B1171EE0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 6.939 seconds (init: 0.292, invoke: 6.646)
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 3869 in cache file under C:\Users\smyuser\.azure\telemetry\20241121085156741
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\smyuser\.azure C:\Users\smyuser\.azure\telemetry\20241121085156741"
telemetry.process: Return from creating process 30252
telemetry.main: Finish creating telemetry upload process. azure cli PS C:\PROJECTS\git> az --version
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Extensions:
azure-devops 0.26.0
connectedk8s 1.6.3
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\sjabbour\.azure\cliextensions'
Python (Windows) 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date. |
Same issue with 2.66 and 2.67 on Windows 11
|
I was facing the same problem, to solve the issues unistall the python 3.12 , and install the latest version of python (3.13) and reset the PATH variable. And it working fine |
Can confirm uninstalling python 3.12 and installing python 3.13 resolved the issue for me as well while running: |
Describe the bug
On Windows 11 with Azure CLI version 2.66 running the command
az extension add --name rdbms-connect
results in the error:An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
Related command
az extension add --name rdbms-connect
Errors
An error occurred. Pip failed with status code 3221225477. Use --debug for more information.
Issue script & Debug output
Expected behavior
That the extension is installed without error.
Environment Summary
Additional context
Previous versions of the azure cli would output the following in the debug log:
Removed configobj>=5.0.6 from https://files.pythonhosted.org/packages/f5/c4/c7f9e41bc2e5f8eeae4a08a01c91b2aea3dfab40a3e14b25e87e7db8d501/configobj-5.0.9.tar.gz (from pgcli==4.0.1->rdbms-connect==1.0.7)
And further investigation shows that configobj version 5.0.9 is the culprit, it is the package that breaks the installation. Trying previous version like 5.0.8 doesn't have any problems.
A possible workaround is to create a
constraints.txt
file with the contents:And then run the installation command manually like so, to make sure the configobj dependency is constrained to a version that still works:
The text was updated successfully, but these errors were encountered: