felixrieseberg / windows-build-tools

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

Install Hangs at "Successfully installed Python 2.7" #123

Closed ryanvgates closed 6 years ago

ryanvgates commented 6 years ago

I ran the command npm install --global --production windows-build-tools from the Command Prompt as Administrator on Windows.

image

I noticed that it was stuck at this point and pressed Control + C. It prompted me to Terminate batch job (Y/N)? I entered N but it still terminated.

I looked in the log and found the following error.

[34A4:1CA4][2018-06-12T10:39:24]i300: Apply begin
[34A4:1CA4][2018-06-12T10:39:24]i000: MUX:  Apply Phase Begin
[34A4:1CA4][2018-06-12T10:39:24]i000: MUX:  -----------------
[34A4:1CA4][2018-06-12T10:39:24]i000: MUX:  Metrics: ShouldSendData=True
[34A4:1CA4][2018-06-12T10:39:24]i000: Setting string variable 'CEIPConsent' to value '/CEIPconsent'
[34A4:1CA4][2018-06-12T10:39:24]e000: MUX:  WARNING: Item has already been added. Key in dictionary: 'path'  Key being added: 'path'
[34A4:1CA4][2018-06-12T10:39:24]e000: MUX:  Stack:    at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
   at System.Collections.Hashtable.Add(Object key, Object value)
   at System.Collections.Specialized.StringDictionary.Add(String key, String value)
   at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
   at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
   at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
   at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
   at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
   at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type)
   at Microsoft.Devdiv.Bootstrapper.CustomizationViewModel.UpdateStateStore()
   at Microsoft.Devdiv.Bootstrapper.ViewModelBase.ApplyBegin(Object sender, ApplyBeginEventArgs e)

I noticed another error as well.

[06D0:2B08][2018-06-12T13:37:53]i000: MUX:  Setup update feature is enabled. Evaluating conditions to determine whether to run setup update.
[06D0:2B08][2018-06-12T13:37:54]i000: MUX:  Checking http://go.microsoft.com/fwlink/?LinkID=659005 for update.
[06D0:2B08][2018-06-12T13:37:54]e000: MUX:  Exception: Info: Could not download update data.
[06D0:2B08][2018-06-12T13:37:54]e000: MUX:  WARNING: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.
[06D0:2B08][2018-06-12T13:37:54]e000: MUX:  Stack:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at Microsoft.Devdiv.Bootstrapper.DownloadManager.DownloadXml(String url, Int32& returnCode)
[06D0:2B08][2018-06-12T13:37:54]i000: MUX:  Failed to download the update xml file from http://go.microsoft.com/fwlink/?LinkID=659005 Setup will not be updated.
[06D0:2B08][2018-06-12T13:37:54]i052: Condition '( (CommunityCheck_DetectKey = 1) ) AND (CurrentOperation = "Install") ' evaluates to false.
[06D0:2B08][2018-06-12T13:37:54]i052: Condition '((WDExpress_DetectKey = 1) ) AND (CurrentOperation = "Install")' evaluates to false.
[06D0:2B08][2018-06-12T13:37:54]i052: Condition '( (VSWinExpress_DetectKey = 1) ) AND (CurrentOperation = "Install")' evaluates to false.
[06D0:2B08][2018-06-12T13:37:54]i052: Condition '(VersionNT < v6.3) and ((not netfxfullredist_43_DetectKey_Exists) or (netfxfullredist_43_DetectKey_Version < v4.5.50709) or (netfxfullredist_43_DetectKey_Release < 378758))' evaluates to false.
[06D0:2B08][2018-06-12T13:37:54]i052: Condition '(VersionNT = v6.3) AND (netfxfullredist_43_DetectKey < v4.5.25000)' evaluates to false.

How can I fix or work around this error?

lolptdr commented 6 years ago

@ryanvgates see #116. That might solve your problem

ryanvgates commented 6 years ago

Thanks @lolptdr . I have tried to add Variable: IsInstalled = 1 to the log file. However it has not resolved the issue after saving it.

MAJIDNISAR commented 6 years ago

same issue here G:\Projects\middleware\Middleware-UAE [ProductionMove ≡ +4 ~2 -0 !]> npm -g i windows-build-tools@latest > windows-build-tools@3.0.0 postinstall C:\Users\ThunderEmperor\AppData\Roaming\npm\node_modules\windows-build-tools > node ./dist/index.js Downloading BuildTools_Full.exe [> ] 0.0% (0 B/s) Downloaded BuildTools_Full.exe. Saved to C:\Users\ThunderEmperor.windows-build-tools\BuildTools_Full.exe. Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient! Status from the installers: ---------- Visual Studio Build Tools ---------- [328C:1AB0][2018-06-15T12:27:17]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{a9528995-e130-4501-ae19-bbfaddb779cc}, resume: ARP, restart initiated: No, disable resume: No [05E0:0EC0][2018-06-15T12:27:17]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No ------------------- Python -------------------- Python 2.7.15 is already installed, not installing again.

image

daniellizik commented 5 years ago

i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.

zblcm commented 5 years ago

i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.

Works for me. Thanks!

Sheshank-s commented 5 years ago

That fixed it for me as well. I think there should be a notice or something telling users that if you have python 2.7 installed already it won't work

robianmcd commented 4 years ago

Can this issue be reopened? There is a workaround but the bug still exists

Jagadesh-Ram commented 4 years ago

Hey @robianmcd can you post the workaround please? am still facing it for more than 2 weeks.

action-hong commented 4 years ago

some issue @robianmcd can you share your workaround plz

L96Github commented 4 years ago

as said by @daniellizik,

i already had 2.7 installed on my machine...uninstalled python, installed windows build tools again, worked.

the workaround of uninstalling my existing python 2.7 also worked for me. Surely there is a better way to mitigate this issue...

yunkido commented 4 years ago

git@github.com:yunkido/npm.git

yunkido commented 4 years ago

git@github.com:yunkido/npm.git

yunkido commented 4 years ago

2 3 npm sucessful

nasouhmr commented 3 years ago

Solved for me check this article https://www.programmersought.com/article/29626541051/