azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Installing `k8s-configuration` and `connectedk8s` fails: distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required.

Open ponatara opened this issue 4 years ago • 7 comments

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug When installing k8s-configuration and connectedk8s extensions using latest version of az cli, we are seeing the following issue. Using an earlier version of the az cli works.

image

image

To Reproduce

Expected behavior CLI-extension addition should succeed

Environment summary az cli version: 2.35.0 Observed in certain Windows envs Observed on 2 different setups as of now

Additional context

Excerpts from --debug logs:

`` Given no hashes to check 1 links for project 'pycryptodome': discarding no candidates Collecting pycryptodome==3.9.8 Created temporary directory: C:\Users\v-vgujjula\AppData\Local\Temp\pip-unpack-nxnyjrrh https://files.pythonhosted.org:443 "GET /packages/4c/2b/eddbfc56076fae8deccca274a5c70a9eb1e0b334da0a33f894a420d0fe93/pycryptodome-3.9.8.tar.gz HTTP/1.1" 200 15633268 Downloading pycryptodome-3.9.8.tar.gz (15.6 MB) -------------------------------------- 15.6/15.6 MB 759.2 kB/s eta 0:00:00 Added pycryptodome==3.9.8 from https://files.pythonhosted.org/packages/4c/2b/eddbfc56076fae8deccca274a5c70a9eb1e0b334da0a33f894a420d0fe93/pycryptodome-3.9.8.tar.gz#sha256=0e24171cf01021bc5dc17d6a9d4f33a048f09d62cc3f62541e95ef104588bda4 (from connectedk8s==1.2.7) to build tracker 'C:\Users\v-vgujjula\AppData\Local\Temp\pip-req-tracker-6brsqoeq' Running setup.py (path:C:\Users\v-vgujjula\AppData\Local\Temp\pip-install-fljwg0g7\pycryptodome_00b584ba641944f0a9efb77b7443eb3a\setup.py) egg_info for package pycryptodome Created temporary directory: C:\Users\v-vgujjula\AppData\Local\Temp\pip-pip-egg-info-p85c4npj Preparing metadata (setup.py): started Running command python setup.py egg_info Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\v-vgujjula\AppData\Local\Temp\pip-install-fljwg0g7\pycryptodome_00b584ba641944f0a9efb77b7443eb3a\setup.py", line 457, in set_compiler_options(package_root, ext_modules) File "C:\Users\v-vgujjula\AppData\Local\Temp\pip-install-fljwg0g7\pycryptodome_00b584ba641944f0a9efb77b7443eb3a\compiler_opt.py", line 341, in set_compiler_options clang = compiler_is_clang() File "C:\Users\v-vgujjula\AppData\Local\Temp\pip-install-fljwg0g7\pycryptodome_00b584ba641944f0a9efb77b7443eb3a\compiler_opt.py", line 251, in compiler_is_clang return test_compilation(source, msg="clang") File "C:\Users\v-vgujjula\AppData\Local\Temp\pip-install-fljwg0g7\pycryptodome_00b584ba641944f0a9efb77b7443eb3a\compiler_opt.py", line 82, in test_compilation objects = compiler.compile([fname], extra_postargs=extra_cc_options) File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\setuptools/_distutils/_msvccompiler.py", line 327, in compile File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\setuptools/_distutils/_msvccompiler.py", line 224, in initialize File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\setuptools/msvc.py", line 316, in msvc14_get_vc_env File "D:\a\1\s\build_scripts\windows\artifacts\Python\Lib\site-packages\setuptools/msvc.py", line 270, in _msvc14_get_vc_env distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ Testing support for clang error: subprocess-exited-with-error

python setup.py egg_info did not run successfully. exit code: 1

ponatara avatar Apr 06 '22 21:04 ponatara

We are also seeing this error, started today.

DCMattyG avatar Apr 06 '22 22:04 DCMattyG

Same, also seeing this error

dkirby-ms avatar Apr 06 '22 22:04 dkirby-ms

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Apr 06 '22 22:04 ghost

route to CXP team

yonzhan avatar Apr 06 '22 22:04 yonzhan

Similar to https://github.com/Azure/azure-cli-extensions/issues/4608, https://github.com/Azure/azure-cli-extensions/pull/4610

MSI's bundled Python has been updated to 3.10 (https://github.com/Azure/azure-cli/pull/21746). k8s-configuration and connectedk8s depend on pycryptodome==3.9.8 which doesn't release wheels for Python 3.10:

https://pypi.org/project/pycryptodome/3.9.8/#files

image

The latest pycryptodome 3.14.1 works with Python 3.10 using ABIs:

https://pypi.org/project/pycryptodome/#files

image

Workaround

While we will bump the pycryptodome dependency in k8s-configuration and connectedk8s, you may install Visual Studio so that pycryptodome can compile on Windows: https://visualstudio.microsoft.com/downloads/

jiasli avatar Apr 07 '22 03:04 jiasli

connectedk8s has been fixed by https://github.com/Azure/azure-cli-extensions/pull/4607 and released by https://github.com/Azure/azure-cli-extensions/pull/4647.

jiasli avatar Apr 07 '22 06:04 jiasli

@ponatara Could you please check the above comment and let us know if you have any further questions on this ? Awaiting your reply.

navba-MSFT avatar Apr 07 '22 09:04 navba-MSFT