gpt4 book ai didi

node.js - Windows-Build-Tools无法下载python

转载 作者:太空宇宙 更新时间:2023-11-04 01:29:22 37 4
gpt4 key购买 nike

我正在尝试使用 NPM 为 Electron 项目安装 Windows-Build-Tools。但是,当我运行 npm install --global --product windows-build-tools 时,出现此错误:

Downloading python-2.7.15.amd64.msi
Error: getaddrinfo EAI_AGAIN www.python.org:443
Downloading Python failed. Error: { Error: getaddrinfo EAI_AGAIN www.python.org:443
at Object._errnoException (util.js:992:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
code: 'EAI_AGAIN',
errno: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'www.python.org',
host: 'www.python.org',
port: 443 }
windows-build-tools will now exit.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! windows-build-tools@5.1.0 postinstall: `node ./dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools@5.1.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\blahblah\AppData\Roaming\npm-cache\_logs\2019-06-13T00_02_38_046Z-debug.log

我的机器上已经安装了 python 2.7.16,如果有一种方法可以在不使用 python 的情况下安装此软件包,我将不胜感激。

I'm doing this

最佳答案

使用镜像链接安装 Python:

 npm --python_mirror=https://npm.taobao.org/mirrors/python/ install --global windows-build-tools

最后,这有效了: github

关于node.js - Windows-Build-Tools无法下载python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56571835/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com