当前位置:首页 > 操作系统 > Windows

npm安装windows-build-tools时卡在Successfully installed Python

npm安装windows-build-tools时卡在Successfully installed Python

在使用vue.js的过程中,我们经常遇到缺少python2.7和VS 2017等构建工具,在网络上查阅相关教程后,得知需要安装windows-build-tools工具,但在安装过程中很多人都遇到Windows PowerShell中卡到Successfully installed Python时不动的情况。

解决步骤

  1. 运行npm install -g windows-build-tools

                    <code>npm install -g windows-build-tools
    </code>
                
  2. 在环境变量中找%temp%文件夹下的dd_installer_XXXXXX.log文件(如:dd_installer_20210824256821.log

  3. 查看此文件,确保日志中输出了Closing the installer with exit code 0。

                    <code>Closing the installer with exit code 0
    </code>
                
  4. 确保你安装了Visual Studio Build Tools,在开始菜单里查找Visual Studio Build Tools是否安装完成。

  5. 在%temp%目录下创建一个名为dd_client_.log的文件

                    <code>dd_client_.log
    </code>
                
  6. 编辑5中创建的文件,加入一行Closing installer. Return code: 3010.然后保存。

                    <code>Closing installer. Return code: 3010
    </code>
                

注:%temp%文件夹默认时为C:Users【用户名】AppDataLocalTemp,如我的就是

        <code>C:UsersadminAppDataLocalTemp
</code>
    

参考资料:https://github.com/felixrieseberg/windows-build-tools/issues/244

原文:https://www.cnblogs.com/ldy731729142/p/15182801.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐