cnpm install -g remix-ide 始终无法成功安装,怎么解决?

2018-08-10 15:06:18 +08:00
 chinatreeqy
λ cnpm install -g remix-ide
Downloading remix-ide to C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide_tmp
Copying C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide_tmp\_remix-ide@0.6.4@remix-ide to C:\Users\wl\AppD
ata\Roaming\npm\node_modules\remix-ide
Installing remix-ide's dependencies to C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide/node_modules
[remixd@git+https://github.com/ethereum/remixd.git] install remixd from git git+https://github.com/ethereum/remixd.git, may be very slow, please keep patience
[1/2] http-server@0.9.0 installed at node_modules\_http-server@0.9.0@http-server
fsevents@1.2.4 download from binary mirror: {"module_name":"fse","module_path":"./lib/binding/{configuration}/{node_abi}-{platform}-{arch}/","remote_path":"./v{version}/","package_name":"{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz","host":"https://cdn.npm.taobao.org/dist/fsevents"}
platform unsupported remixd@0.1.8-alpha.4 › chokidar@2.0.4 › fsevents@^1.2.2 Package require os(darwin) not compatible with your platform(win32)
[fsevents@^1.2.2] optional install error: Package require os(darwin) not compatible with your platform(win32)
[remixd@0.1.8-alpha.4 › web3@1.0.0-beta.27 › web3-core@1.0.0-beta.27 › web3-core-requestmanager@1.0.0-beta.27 › web3-providers-ws@1.0.0-beta.27 › websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible] install websocket from git git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible, may be very slow, please keep patience
scripts.preinstall remixd@0.1.8-alpha.4 › web3@1.0.0-beta.27 › web3-eth@1.0.0-beta.27 › web3-eth-accounts@1.0.0-beta.27 › scrypt.js@0.2.0 › scrypt@^6.0.2 "node node-scrypt-preinstall.js"
[2/2] remixd@git+https://github.com/ethereum/remixd.git installed at node_modules\_remixd@0.1.8-alpha.4@remixd
execute post install 3 scripts...
[1/3] scripts.install remixd@0.1.8-alpha.4 › websocket@^1.0.24 run "(node-gyp rebuild 2> builderror.log) || (exit 0)"

C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide\node_modules\_websocket@1.0.26@websocket>node "C:\Users\wl\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild
[1/3] scripts.install remixd@0.1.8-alpha.4 › websocket@^1.0.24 finished in 841ms
[2/3] scripts.install remixd@0.1.8-alpha.4 › web3@1.0.0-beta.27 › web3-eth@1.0.0-beta.27 › web3-eth-accounts@1.0.0-beta.27 › scrypt.js@0.2.0 › scrypt@^6.0.2 run "node-gyp rebuild"

C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide\node_modules\_scrypt@6.0.3@scrypt>node "C:\Users\wl\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:288:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "C:\\Users\\wl\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npminstall\\node-gyp-bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\wl\AppData\Roaming\npm\node_modules\remix-ide\node_modules\_scrypt@6.0.3@scrypt
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Install fail! Error: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
Error: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (C:\Users\wl\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:74:21)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5)
npminstall version: 3.11.0
npminstall args: D:\Program Files\nodejs\node.exe C:\Users\wl\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\wl\.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org -g remix-ide
7016 次点击
所在节点    Node.js
1 条回复
Rsplwe
2018-08-26 10:45:13 +08:00
安装个 python 2 吧

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/478630

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX