windows-build-tools icon indicating copy to clipboard operation
windows-build-tools copied to clipboard

Installation Hangs after "Successfully installed Python 2.7" and no log file for visual studio build tools

Open jashang87 opened this issue 5 years ago • 27 comments

I run the "npm install --global --production windows-build-tool" and installation got stuck after "Successfully installed Python 2.7" (almost 2 hours) image And no log file for studio build tools in ".windows-build-tools" folder image It installed some programs related to Visual Studio (control panel screenshot below) image Any idea how to fix this? Thanks

jashang87 avatar Jan 29 '19 15:01 jashang87

I am experiencing the same thing. Windows 10 nodejs 10.11.0

terebentina avatar Feb 01 '19 11:02 terebentina

Hi @terebentina , I figured that everything is installed as required (Python and VS 2017) but the CMD script/installer got stuck and can't get the feedback from VS installer. So after installer installed the VS 2017 components (as shown in screenshot in my initial post, will take some time to install everything), I opened the task manager and killed "node.exe" processes (two of those processes were running) and then I closed the CMD window, opened a new CMD window and went to next step (in my case, installed node-gyp) and everything worked fine on second attempt (it didn't work first time, I uninstalled everything and followed the process again as I mentioned above).

jashang87 avatar Feb 01 '19 20:02 jashang87

You may want to take a look at this post: https://github.com/felixrieseberg/windows-build-tools/issues/152#issuecomment-432945646

aifodu avatar Feb 13 '19 23:02 aifodu

I faced a similar issue. As a workaround I installed the 4.0.0 version npm install --global --production [email protected] and then run the original one npm install -g --production windows-build-tools, and it completed

gian1200 avatar Apr 17 '19 13:04 gian1200

I am stuck with the same issue, cant get over "Python 2.7.10 already installed, not installing again" and stays there for the next ice age like a zen monk :( any help will be appreciated, dont know what to do. Tried what @gain1200 had suggested but no luck.

deepakjha14 avatar Aug 29 '19 06:08 deepakjha14

I faced a similar issue. As a workaround I installed the 4.0.0 version npm install --global --production [email protected] and then run the original one npm install -g --production windows-build-tools, and it completed

Thank you :) @gian1200

npm install --global --production windows-build-tools

You may see this error below : (Just reboot the system , and run the above in window power shell as admin) 2019-10-02T04:22:16 : Error : It looks like you're installing or modifying another product right now. Please wait until all other operations are finished and try again.

it i

harmandeep-singh avatar Oct 01 '19 22:10 harmandeep-singh

Hi everyone! I found the solution to this problem with this steps:

  1. Uninstall Python 2.7
  2. Install this version of Python
  3. Run npm install --global windows-build-tools

Let me know if it works!

peraltafederico avatar Nov 28 '19 03:11 peraltafederico

@peraltafederico Thank you this worked for me!

jonab12 avatar Nov 30 '19 22:11 jonab12

I thought it was stuck too, but it just took about 4 minutes to get past that.

bkelley13 avatar Apr 03 '20 02:04 bkelley13

Hi everyone! I found the solution to this problem with this steps:

Uninstall Python 2.7 Install this version of Python Run npm install --global windows-build-tools

This works, but a note to Python3 users; make sure your 'python' path to python2 takes precedence over python3.

ryanbottema avatar Apr 16 '20 20:04 ryanbottema

ty @peraltafederico for your solution stuck now for one hour and you find the solution thank s a lot

cSarcasme avatar Jun 06 '20 11:06 cSarcasme

I'm not sure if I have a legit solution. After waiting for 30 minutes and nothing happening, I just killed the application. And ran the install script from the beginning again. This time it said python was already installed and then blew through the rest of installation.

nowayhaze avatar Sep 08 '20 23:09 nowayhaze

The 5.2.2 package is adding an entry to the users PATH environment variable every time it runs. As was in a CI scenario it was added 10's of time. Once i removed all unnecessary duplicates the package would again install. 1-22-2021 9-09-32 AM

mcaljamj avatar Jan 22 '21 15:01 mcaljamj

我面临着一个类似的问题。作为一个解决方法,我安装了4.0.0版本,然后运行原来的一个,它完成了npm install --global --production [email protected]``npm install -g --production windows-build-tools

Thanks

Delay-n-days avatar Mar 24 '21 07:03 Delay-n-days

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...

karlhorky avatar Apr 22 '21 14:04 karlhorky

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...

awesome @karlhorky works like charm thankyou very much

Crumor avatar May 10 '21 21:05 Crumor

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...

It worked for me, thank you very much

FernandoMontesinos avatar May 26 '21 04:05 FernandoMontesinos

Should I delete .windows-built-tools folder and uninstall python 2.7 before re-running the commands that are specified as solutions?

Harsh-Khurana avatar Jun 02 '21 06:06 Harsh-Khurana

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...

It really works, cost me several hours , thanks so much.

j1mmy-Z avatar Jun 08 '21 13:06 j1mmy-Z

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...

THANK YOU!

bodrovdev avatar Jun 29 '21 10:06 bodrovdev

npm config set msvs_version 2017 saved me

fabiovaz avatar Jul 02 '21 19:07 fabiovaz

Hi everyone! I found the solution to this problem with this steps:

  1. Uninstall Python 2.7
  2. Install this version of Python
  3. Run npm install --global windows-build-tools

Let me know if it works!

Hello after installing 2.7.17 when I follow step 3 it again installs 2.7.15

bhargu-27 avatar Jul 13 '21 07:07 bhargu-27

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...

It works! thank you man

jokereey avatar Aug 07 '21 18:08 jokereey

Still hangs, doesn't work for me. Off to Linux.

amzbiz avatar Aug 13 '21 23:08 amzbiz

@amzbiz my solution above is an alternative, not a way to make windows-build-tools work.

Once you run those two commands, it has installed the dependencies that windows-build-tools is supposed to install.

karlhorky avatar Aug 14 '21 07:08 karlhorky

Yup I tried with both build tools 2017 and 2019 @karlhorky, one installed directly, and one using your Chocolatey recommendation. Unfortunately neither of those fixed my node 12 build issue. Fortunately I was able to replicate and fix my issue on node 10 but still looks likely I'll need to move to WSL as I don't want to keep pushing things uphill, spent a whole day trying different fixes and none of them got node 12 working 😢.

amzbiz avatar Aug 14 '21 08:08 amzbiz

Interesting, wonder if the tools are installed properly but Node cannot find them for some reason (a path issue or something). Anyway, good luck!

karlhorky avatar Aug 14 '21 08:08 karlhorky