felixrieseberg / windows-build-tools

:package: Install C++ Build Tools for Windows using npm
MIT License
3.4k stars 237 forks source link

Stuck at python installed successfully #244

Closed mohdsameer7408 closed 3 years ago

mohdsameer7408 commented 3 years ago

I have tried installing this package with node 14 as well as node 10 from two days whenever I try to install windows build tools it always stuck at python installed successfully and doesn't do anything I have even waited for 4-5 hrs even though I have a good internet connection

luisangelorjr commented 3 years ago

Me too (and my team)!

Today I'm trying others old versions of npm/node

MaxWeisen commented 3 years ago

I am also stuck at 'Successfully installed Python 2.7"

jwonderly commented 3 years ago

I managed to find a workaround. There is an issue with the windows-build-tools script finding the log file for the VS build tools installer; it seems maybe the log file created by the VS build tools installer has changed.

The script is looking for a log file with a name starting with dd_client_ in the folder %USERPROFILE%\AppData\Local\Temp, but the VS build tools installer doesn't seem to be creating any file starting with dd_client_.

The workaround I used was this:

  1. Run npm install -g windows-build-tools
  2. Navigate to %USERPROFILE%\AppData\Local\Temp and look for a log file with a name like dd_installer_20210421124746.log
  3. Keep checking the contents of the log file until you see a message Closing the installer with exit code 0
  4. Check your list of installed programs to verify it includes Visual Studio Build Tools
  5. Create a file in %USERPROFILE%\AppData\Local\Temp named dd_client_.log
  6. Edit dd_client_.log, add the string Closing installer. Return code: 3010., and save the file

Then the windows-build-tools script should continue.

MaxWeisen commented 3 years ago

@jwonderly This workaround got the script to complete. Now I am seeing "All done!" at the end of the script.

Thank you!!

karlhorky commented 3 years ago

Another option is to try installing the build tools via Chocolatey instead (use an Administrator command line):

choco install python visualstudio2017-workload-vctools -y
npm config set msvs_version 2017

Maybe this should be documented in the readme as an alternative...

MaxWeisen commented 3 years ago

Another option is to try installing the build tools via Chocolatey instead (use an Administrator command line):

choco install python visualcpp-build-tools -y
npm config set msvs_version 2017

Maybe this should be documented in the readme as an alternative...

This option is a lot less hacky than editing .log's!

mohdsameer7408 commented 3 years ago

Everyone's solution was helpful. Thanks a lot.