az extension add is not installing dependent pycryptodome library defined in setup.py
Describe the bug k8s-configuration extension has defined pycryptodome as dependent library in setup.py (https://github.com/Azure/azure-cli-extensions/blob/main/src/k8s-configuration/setup.py#L33), is not getting installed when the extension is added. This was reported by customer - https://github.com/Azure/azure-cli/issues/19562
To Reproduce
Install k8s-configuration extension
Then run az k8s-configuration show
NOTE: This was also repro'd by Az CLI Team, when reported in Internal Teams channel
The command fails with the following error
The command failed with an unexpected error. Here is the traceback:
Cannot load native module 'Crypto.PublicKey._ec_ws': Trying '_ec_ws.cp38-win32.pyd': cannot load library 'C:\Users\nithinkadumberi.azure\cliextensions\k8s-configuration\Crypto\Util..\PublicKey_ec_ws.cp38-win32.pyd': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\Users\nithinkadumberi\.azure\cliextensions\k8s-configuration\Crypto\Util\..\PublicKey\_ec_ws.cp38-win32.pyd', Trying '_ec_ws.pyd': cannot load library 'C:\Users\nithinkadumberi.azure\cliextensions\k8s-configuration\Crypto\Util..\PublicKey_ec_ws.pyd': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'C:\Users\nithinkadumberi\.azure\cliextensions\k8s-configuration\Crypto\Util\..\PublicKey\ec_ws.pyd'
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 556, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 517, in load_arguments
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 313, in load_arguments
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/commands.py", line 104, in load_arguments
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 367, in arguments_loader
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 70, in load_getter_op_arguments
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
File "importlib_init.py", line 127, in import_module
File "
File "C:\Users\nithinkadumberi.azure\cliextensions\k8s-configuration\azext_k8s_configuration_validators.py", line 18, in
Expected behavior az k8s-configuration show command runs successfully
Environment summary Windows-10-10.0.19041-SP0 Python 3.8.9 Installer: MSI
azure-cli 2.27.0 *
Extensions: aks-preview 0.5.29 azure-devops 0.20.0 blueprint 0.3.1 connectedk8s 1.1.7 k8s-configuration 1.1.0 resource-graph 2.1.0
Additional context
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. azure-cli-core 2.30.0.post20211112091047 requires requests[socks]~=2.25.1, but you have requests 2.26.0 which is incompatible.
This issue is caused by the dependency conflicts introduced by PR https://github.com/Azure/azure-cli/pull/18931. And we already have a PR https://github.com/Azure/azure-cli/pull/19801 can solve this issue We plan to release the fix PR on 12-07