What to do if Linux "pwsh" az extension add --name azure-iot fails due to No matching distribution found for paho-mqtt==1.5.0

UnexpectedGrit 11 Reputation points
2021-06-25T21:06:18.277+00:00

debuguser@debuguser:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.04
Release: 21.04
Codename: hirsute
debuguser@debuguser:~$ pwsh
PowerShell 7.1.3
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/debuguser> get-host

Name : ConsoleHost
Version : 7.1.3
InstanceId : f56d6937-7c6b-49a2-b15d-0ad6f545228b
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace

PS /home/debuguser> az extension list
[
{
"experimental": false,
"extensionType": "whl",
"name": "azure-devops",
"path": "/home/debuguser/.azure/cliextensions/azure-devops",
"preview": false,
"version": "0.18.0"
}
]
PS /home/debuguser> az extension add --name azure-iot --debug
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'azure-iot', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f1496de3c80>, <function OutputProducer.on_global_arguments at 0x7f1496d5c488>, <function CLIQuery.on_global_arguments at 0x7f1496cec598>]
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.001 1 7
cli.azure.cli.core: Total (1) 0.001 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 0x7f1496467b70>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/debuguser/.azure/commands/2021-06-25.14-52-04.extension_add.66423.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 0x7f1496411ae8>, <function register_global_query_examples_argument.<locals>.register_query_examples at 0x7f14963eeb70>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f14963eebf8>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f14963eed08>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f1496d5c510>, <function CLIQuery.handle_query_parameter at 0x7f1496cec620>, <function register_global_query_examples_argument.<locals>.handle_example_parameter at 0x7f14963eeae8>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f14963eec80>]
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 1018162
cli.azure.cli.core.extension._resolve: Candidates ['azure_iot-0.10.11-py3-none-any.whl', 'azure_iot-0.10.13-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_iot-0.10.11-py3-none-any.whl', 'azure_iot-0.10.13-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_iot-0.10.11-py3-none-any.whl', 'azure_iot-0.10.13-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Candidates ['azure_iot-0.10.13-py3-none-any.whl', 'azure_iot-0.10.11-py3-none-any.whl']
cli.azure.cli.core.extension._resolve: Choosing the latest of the remaining candidates.
cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.10.13/azure_iot-0.10.13-py3-none-any.whl', 'filename': 'azure_iot-0.10.13-py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.17.1', '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', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': 'iotupx@microsoft.com', 'name': 'Microsoft', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/azure/azure-iot-cli-extension'}}}, 'extras': [], 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'azure-iot', 'requires_python': '>=3.6,<4', 'run_requires': [{'requires': ['jsonschema (==3.2.0)', 'packaging', 'paho-mqtt (==1.5.0)']}], 'summary': 'The Azure IoT extension for Azure CLI.', 'version': '0.10.13'}, 'sha256Digest': 'a4e684dd021306bc1e48ec22243f59a7679aff55174d37401e861b7b595565f5'}
cli.azure.cli.core.extension.operations: Extension source is url? True
cli.azure.cli.core.extension.operations: Downloading https://github.com/Azure/azure-iot-cli-extension/releases/download/v0.10.13/azure_iot-0.10.13-py3-none-any.whl to /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl
urllib3.connectionpool: Starting new HTTPS connection (1): github.com:443
urllib3.connectionpool: https://github.com:443 "GET /Azure/azure-iot-cli-extension/releases/download/v0.10.13/azure_iot-0.10.13-py3-none-any.whl HTTP/1.1" 302 642
urllib3.connectionpool: Starting new HTTPS connection (1): github-releases.githubusercontent.com:443
urllib3.connectionpool: https://github-releases.githubusercontent.com:443 "GET /103456760/e0c42280-bd6c-11eb-8b8a-2007b1b0b3cd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210625%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210625T205206Z&X-Amz-Expires=300&X-Amz-Signature=271ec84cecbf99c2bf708622da931b7aef27b0feafa7f031c490cbeb7c98ccff&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=103456760&response-content-disposition=attachment%3B%20filename%3Dazure_iot-0.10.13-py3-none-any.whl&response-content-type=application%2Foctet-stream HTTP/1.1" 200 618981
cli.azure.cli.core.extension.operations: Downloaded to /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl
cli.azure.cli.core.extension.operations: Validating the extension /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl
cli.azure.cli.core.extension.operations: Checksum of /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl is OK
cli.azure.cli.core.extension.operations: Validation successful on /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl
cli.azure.cli.core.extension.operations: Linux distro check: Reading from: /etc/apt/sources.list.d/azure-cli.list
cli.azure.cli.core.extension.operations: Linux distro check: Found in list file: focal
cli.azure.cli.core.extension.operations: Linux distro check: Reported by API: hirsute
cli.azure.cli.core.extension.operations: Linux distro check: Mismatch distribution name in /etc/apt/sources.list.d/azure-cli.list file
cli.azure.cli.core.extension.operations: Linux distro check: If command fails, install the appropriate package for your distribution or change the above file accordingly.
cli.azure.cli.core.extension.operations: Linux distro check: /etc/apt/sources.list.d/azure-cli.list has 'focal', current distro is 'hirsute'
cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', '/home/debuguser/.azure/cliextensions/azure-iot', '/tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl']
cli.azure.cli.core.extension.operations: Running: ['/usr/bin/../../opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/debuguser/.azure/cliextensions/azure-iot', '/tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Using pip 21.0.1 from /opt/az/lib/python3.6/site-packages/pip (python 3.6)
Non-user install due to --prefix or --target option
Created temporary directory: /tmp/pip-target-vi73sb_a
Created temporary directory: /tmp/pip-ephem-wheel-cache-pfiuwhzs
Created temporary directory: /tmp/pip-req-tracker-zlc_7v8e
Initialized build tracking at /tmp/pip-req-tracker-zlc_7v8e
Created build tracker: /tmp/pip-req-tracker-zlc_7v8e
Entered build tracker: /tmp/pip-req-tracker-zlc_7v8e
Created temporary directory: /tmp/pip-install-7oa9oo2o
Processing /tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl
Added azure-iot==0.10.13 from file:///tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl to build tracker '/tmp/pip-req-tracker-zlc_7v8e'
Removed azure-iot==0.10.13 from file:///tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl from build tracker '/tmp/pip-req-tracker-zlc_7v8e'
1 location(s) to search for versions of paho-mqtt:
* https://pypi.org/simple/paho-mqtt/
Fetching project page and analyzing links: https://pypi.org/simple/paho-mqtt/
Getting page https://pypi.org/simple/paho-mqtt/
Found index url https://pypi.org/simple
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/paho-mqtt/ HTTP/1.1" 200 1761
Found link https://files.pythonhosted.org/packages/4f/4a/7cacf78295fe9e9c8ee4edce2b817c9f506b218c44cae28d727807f935b3/paho-mqtt-0.4.90.tar.gz#sha256=6cbb955c504eefe02526aed063e51b646ad0e7a02642a0f6637690ae27941e9c (from https://pypi.org/simple/paho-mqtt/), version: 0.4.90
Found link https://files.pythonhosted.org/packages/91/27/3764e239991acc8a202064e113be776fbd941320bde357b9e40b29fbcea7/paho-mqtt-0.4.91.tar.gz#sha256=b7fb297d1cb44ebab320d6ef44ff4d9ed32999a92b7caa9158d45a44d782c2e9 (from https://pypi.org/simple/paho-mqtt/), version: 0.4.91
Found link https://files.pythonhosted.org/packages/02/59/4d183f02e06e9150be4d6f7fc76576301bd188227e0cb451979fdc1a0c6d/paho-mqtt-0.4.92.tar.gz#sha256=337967543be5d6555151114acf4d94cb9001de35b23d3dc9e3f8ad4d07cc62d5 (from https://pypi.org/simple/paho-mqtt/), version: 0.4.92
Found link https://files.pythonhosted.org/packages/9c/fb/d1cdca82dc88edd7562bfa0f6795600e5352c10f5c1c5abf0e9963e8fe2f/paho-mqtt-0.4.94.tar.gz#sha256=70e4e2d43e714c23fbc70ba97b9ca31279a2dc2a893374c696237c547c4a2dad (from https://pypi.org/simple/paho-mqtt/), version: 0.4.94
Found link https://files.pythonhosted.org/packages/e8/dc/4acbf85f11f1545eddadefa13f5ab858aa9a7f2a508413e6091ec316d307/paho-mqtt-0.9.tar.gz#sha256=e4592f205cbb63f1c67fb22307519dadd9af1c9453c1a9ddebca1ccfa7579c33 (from https://pypi.org/simple/paho-mqtt/), version: 0.9
Found link https://files.pythonhosted.org/packages/51/ea/6c65fd07f5e77b9303fe4948caf81f6618a9e3e68a5f98c7dc0269d4dce0/paho-mqtt-0.9.1.tar.gz#sha256=97808e4bc0af628e7d8608bbc9d256726a12d5290c6a155064d54bdfa4041636 (from https://pypi.org/simple/paho-mqtt/), version: 0.9.1
Found link https://files.pythonhosted.org/packages/ec/4d/834faa69313deec0d3414bdc276ec2e49d8b34e2305b6dbc70cf47d41f9a/paho-mqtt-1.0.tar.gz#sha256=b9d936ad11770c3168becddc4fce706eb369d4cab8273fbc435cc2d4052b3e8a (from https://pypi.org/simple/paho-mqtt/), version: 1.0
Found link https://files.pythonhosted.org/packages/83/96/dacc2b78bc9c5cd83eed178e9ce35d7bceecf2dd38db079c0190423efd4a/paho-mqtt-1.1.tar.gz#sha256=0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e (from https://pypi.org/simple/paho-mqtt/), version: 1.1
Found link https://files.pythonhosted.org/packages/82/d9/7064d3a0a1d62756a1a809c85b99f864c641b66de84c15458f72193b7708/paho-mqtt-1.2.tar.gz#sha256=9100a6aa706ab699d414ec02705a21eb66f436184691d0bf1f2a85a6213c6c1f (from https://pypi.org/simple/paho-mqtt/), version: 1.2
Found link https://files.pythonhosted.org/packages/e0/fb/13680584b3781faf9da3eb5c4728e171d89357cb00cdf1cad6b4e30c8cc8/paho-mqtt-1.2.1.tar.gz#sha256=94f35ffc38ca1668b5c57dc47612284bf95b105d43d0cecd4c06896e2508779a (from https://pypi.org/simple/paho-mqtt/), version: 1.2.1
Found link https://files.pythonhosted.org/packages/31/0f/53f71dc9033b492ba6546c452c35722621f9120cee6b905808d893fa0d97/paho-mqtt-1.2.2.tar.gz#sha256=cf297194d2a716010b5ff975f735d025ac3cdb4a317e9330abde4f73a006f1b0 (from https://pypi.org/simple/paho-mqtt/), version: 1.2.2
Found link https://files.pythonhosted.org/packages/ce/27/28ac0859fb8d63754ec51659be265bf3b89d1568c5f6736d21026e11ea85/paho-mqtt-1.2.3.tar.gz#sha256=0fd746d8650563290f1bd0fec01e74cb57c3ab7406bdb58e5d9252bb5fa5ca44 (from https://pypi.org/simple/paho-mqtt/), version: 1.2.3
Found link https://files.pythonhosted.org/packages/33/7f/3ce1ffebaa0343d509aac003800b305d821e89dac3c11666f92e12feca14/paho-mqtt-1.3.0.tar.gz#sha256=2c9ef5494cfc1e41a9fff6544c5a2cd59ea5d401d9119a06ecf7fad6a2ffeb93 (from https://pypi.org/simple/paho-mqtt/), version: 1.3.0
Found link https://files.pythonhosted.org/packages/2a/5f/cf14b8f9f8ed1891cda893a2a7d1d6fa23de2a9fb4832f05cef02b79d01f/paho-mqtt-1.3.1.tar.gz#sha256=31911f6031de306c27ed79dc77b690d7c55b0dcb0f0434ca34ec6361d0371122 (from https://pypi.org/simple/paho-mqtt/), version: 1.3.1
Found link https://files.pythonhosted.org/packages/25/63/db25e62979c2a716a74950c9ed658dce431b5cb01fde29eb6cba9489a904/paho-mqtt-1.4.0.tar.gz#sha256=e440a052b46d222e184be3be38676378722072fcd4dfd2c8f509fb861a7b0b79 (from https://pypi.org/simple/paho-mqtt/), version: 1.4.0
Found link https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz#sha256=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 (from https://pypi.org/simple/paho-mqtt/), version: 1.5.0
Found link https://files.pythonhosted.org/packages/32/d3/6dcb8fd14746fcde6a556f932b5de8bea8fedcb85b3a092e0e986372c0e7/paho-mqtt-1.5.1.tar.gz#sha256=9feb068e822be7b3a116324e01fb6028eb1d66412bf98595ae72698965cb1cae (from https://pypi.org/simple/paho-mqtt/), version: 1.5.1
Given no hashes to check 1 links for project 'paho-mqtt': discarding no candidates
Collecting paho-mqtt==1.5.0
Created temporary directory: /tmp/pip-unpack-pf6muqq_
Starting new HTTPS connection (1): files.pythonhosted.org:443
https://files.pythonhosted.org:443 "GET /packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz HTTP/1.1" 200 99525
Downloading paho-mqtt-1.5.0.tar.gz (99 kB)
Added paho-mqtt==1.5.0 from https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz#sha256=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 (from azure-iot==0.10.13) to build tracker '/tmp/pip-req-tracker-zlc_7v8e'
Running setup.py (path:/tmp/pip-install-7oa9oo2o/paho-mqtt_aa65ad320aec491ebaa8a211c3337fb7/setup.py) egg_info for package paho-mqtt
Created temporary directory: /tmp/pip-pip-egg-info-l2ny85gn
Running command python setup.py egg_info
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/az/lib/python3.6/site-packages/setuptools/init.py", line 18, in <module>
from setuptools.dist import Distribution, Feature
File "/opt/az/lib/python3.6/site-packages/setuptools/dist.py", line 31, in <module>
from setuptools import windows_support
File "/opt/az/lib/python3.6/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/opt/az/lib/python3.6/ctypes/init.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
WARNING: Discarding https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz#sha256=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 (from https://pypi.org/simple/paho-mqtt/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement paho-mqtt==1.5.0 (from azure-iot)
ERROR: No matching distribution found for paho-mqtt==1.5.0
Exception information:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
requirements, max_rounds=try_to_avoid_resolution_too_deep,
File "/opt/az/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 453, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/opt/az/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 357, in resolve
raise ResolutionImpossible(causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('paho-mqtt==1.5.0'), parent=LinkCandidate('file:///tmp/tmplxtmlhhr/azure_iot-0.10.13-py3-none-any.whl'))]

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

Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
status = self.run(options, args)
File "/opt/az/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
return func(self, options, args)
File "/opt/az/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 317, in run
reqs, check_supported_wheels=not options.target_dir
File "/opt/az/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 127, in resolve
six.raise_from(error, e)
File "<string>", line 3, in raise_from
pip._internal.exceptions.DistributionNotFound: No matching distribution found for paho-mqtt==1.5.0
Removed paho-mqtt==1.5.0 from https://files.pythonhosted.org/packages/59/11/1dd5c70f0f27a88a3a05772cd95f6087ac479fac66d9c7752ee5e16ddbbc/paho-mqtt-1.5.0.tar.gz#sha256=e3d286198baaea195c8b3bc221941d25a3ab0e1507fc1779bdb7473806394be4 (from azure-iot==0.10.13) from build tracker '/tmp/pip-req-tracker-zlc_7v8e'
Removed build tracker: '/tmp/pip-req-tracker-zlc_7v8e'

cli.azure.cli.core.extension.operations: Command '['/usr/bin/../../opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/home/debuguser/.azure/cliextensions/azure-iot', '/tmp/tmplxtmlhhr/azure_iot-0.10.13-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 /home/debuguser/.azure/cliextensions/azure-iot
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 "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 657, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 691, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 328, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/extension/custom.py", line 18, in add_extension_cmd
version=version, upgrade=upgrade)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 340, in add_extension
pip_extra_index_urls=pip_extra_index_urls, pip_proxy=pip_proxy, system=system)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/extension/operations.py", line 174, in _add_whl_ext
'Use --debug for more information.'.format(pip_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 0x7f1496467d90>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 4.010 seconds (init: 0.071, invoke: 3.938)
telemetry.save: Save telemetry record of length 3206 in cache
telemetry.check: Negative: The /home/debuguser/.azure/telemetry.txt was modified at 2021-06-25 14:51:42.398065, which in less than 600.000000 s
PS /home/debuguser> exit
debuguser@debuguser:~$

109511-latest-paho-mqtt-151.jpg

In "pwsh" I need to add extension "azure-iot", but it seems I'm blocked by the check that says, "... Could not find a version that satisfies the requirement paho-mqtt==1.5.0 (from azure-iot)" Followed by the statement, "... No matching distribution found for paho-mqtt==1.5.0"

It appears the latest version of "paho-mqtt" is 1.5.1 and perhaps this is the cause of the error.

I do not know what to do. I really need the command, "az extension add --name azure-iot" to work in "pwsh" on Linux, but I don't know how to get it to work.

Do any of you guys have any ideas as to what I should try?
I hope I've provided enough information.
Thanks.

Azure Internet of Things
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,671 Reputation points Microsoft Employee Moderator
    2021-06-30T06:15:41.537+00:00

    Thank you for checking that you have the latest version @UnexpectedGrit .

    As per the documentation, Azure CLI is not tested in Ubuntu 21.04 version, and that can be the reason of the unexpected issue: Install the Azure CLI on Linux\Overview

    110364-image.png

    Can I kindly ask that you open an issue in Azure CLI Github Repo and let me know the Link so I can follow-up with the proper team?
    https://github.com/Azure/azure-cli/issues

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.