-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Windows build cannot detect missing Windows SDK #87464
Comments
When compiling for Windows it does not properly handle the version string MSB4184 C:\Users\kevin\cpython>PCbuild\build.bat C:\Users\kevin\cpython>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" "C:\Users\kevin\cpython\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Release /p:Platform=x64 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" Build FAILED. C:\Users\kevin\cpython\PCbuild\python.props(111,31): error MSB4184: The expression "[System.Version]::Parse('')" cannot Time Elapsed 00:00:00.06 |
This should mean that you haven't got the Windows SDK installed, though it might mean that you've got a *newer* WinSDK where they've changed the registration format. But more likely you deselected it when installing C++ support through Visual Studio. Could you open Visual Studio Installer and ensure that the newest Windows SDK item is selected? Assuming the spammers go away, we can use this bug to improve the error message. If they persist, we'll lock this and open a new one. |
Thank you Steve. I did not have the latest installed which is Win10SDK_10.0.18362, therefore it did trigger that original error in msg387518. After installing, Win10SDK_10.0.18362, it did in-fact allow a successful compilation. Updating that error code would be most helpful to Windows developers. I would have never caught it but I wanted to help test 3.10 so I thought I should try it on the Windows 10 box to make sure the community had all platforms covered. RESULTS: Time Elapsed 00:01:10.34 C:\Users\kevin\cpython>python.bat
|
Did you have any other version installed? It should include one by |
Hi Steve actually there was none installed which was strange as I had Visual Studio installed but it was not checked by default. After selecting it and installing it, everything works as expected. Updating the error message in some way might be helpful. |
In bpo-44246, I've encountered this error while attempting to build CPython in a Docker image (built from https://github.com/jaraco/jaraco.windows/blob/d2edad2e2af9d469189d7ac6a14a4ba6f6270348/Dockerfile). Any suggestions on how to install the SDK to a viable version in a headless environment? |
Jason - I think your -add and -remove options need work. I'm pretty sure the AzureBuildTools component doesn't bring in the C++ compilers or the WinSDK. If you configure it manually and interactively, you should be able to export a JSON configuration and then you can use that later to recreate the install elsewhere. |
I was able to export the configuration using these instructions: https://docs.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2019 That produced this config: { Using that, I tried to install those components using vs_buildtools: # Install Visual Studio In order to avoid noise here, I'm going to continue the investigation in jaraco/jaraco.windows#21. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: