Skip to content
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

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

Closed
ponatara opened this issue Apr 6, 2022 · 7 comments · Fixed by Azure/azure-cli-extensions#4643
Assignees
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Connected Kubernetes CXP Attention This issue is handled by CXP team. Installation Kubernetes Configuration needs-author-feedback More information is needed from author to address the issue.
Milestone

Comments

@ponatara
Copy link

ponatara commented Apr 6, 2022

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

@ghost ghost added Auto-Assign Auto assign by bot Installation labels Apr 6, 2022
@ghost ghost assigned jiasli Apr 6, 2022
@ghost ghost added this to the Backlog milestone Apr 6, 2022
@DCMattyG
Copy link

DCMattyG commented Apr 6, 2022

We are also seeing this error, started today.

@dkirby-ms
Copy link

Same, also seeing this error

@yonzhan yonzhan added Connected Kubernetes CXP Attention This issue is handled by CXP team. labels Apr 6, 2022
@ghost
Copy link

ghost commented Apr 6, 2022

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

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 6, 2022

route to CXP team

@jiasli
Copy link
Member

jiasli commented Apr 7, 2022

Similar to Azure/azure-cli-extensions#4608, Azure/azure-cli-extensions#4610

MSI's bundled Python has been updated to 3.10 (#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 jiasli changed the title [WinError 3] The system cannot find the path specified: 'C:\\Users\\v-vgujjula\\.azure\\cliextensions\\connectedk8s'. Retrying ... Installing k8s-configuration and connectedk8s fails: distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Apr 7, 2022
@navba-MSFT navba-MSFT self-assigned this Apr 7, 2022
@jiasli
Copy link
Member

jiasli commented Apr 7, 2022

connectedk8s has been fixed by Azure/azure-cli-extensions#4607 and released by Azure/azure-cli-extensions#4647.

@navba-MSFT
Copy link
Contributor

@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 navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Apr 7, 2022
@navba-MSFT navba-MSFT added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Connected Kubernetes CXP Attention This issue is handled by CXP team. Installation Kubernetes Configuration needs-author-feedback More information is needed from author to address the issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants