Python 3 support?
Opened this issue · 4 comments
When I try to install iTypeScript
under mac, I got the following error
Succesfully build libzmq on Fri Aug 04 2017 11:34:09 GMT-0500 (CDT)
gyp ERR! configure error
gyp ERR! stack Error: Python executable "/Users/bpeng1/anaconda/bin/python" is v3.5.2, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:14)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:395:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack at Socket.<anonymous> (internal/child_process.js:319:11)
gyp ERR! stack at emitOne (events.js:90:13)
gyp ERR! stack at Socket.emit (events.js:182:7)
gyp ERR! stack at Pipe._onclose (net.js:471:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/itypescript/node_modules/zeromq
gyp ERR! node -v v5.6.0
gyp ERR! node-gyp -v v3.2.1
gyp ERR! not ok
/usr/local/lib
└── (empty)
which points to this ticket for node-gyp. Does this mean iTypeScript
only works with Python2?
Simply, yes.
For the execution part, the code followed how iJavascript excutes itself. And as far as I know that iJavascript requires Python2 only when it is installed. You can check iJavascript Issue #83 for the reference.
@nearbydelta Mac users don't require Python2 (Python2 is only required for those OS for which https://github.com/zeromq/zeromq.js doesn't provide prebuilt binaries).
@BoPeng could you post the output of running iTypeScript --versions
?
I have npm
installed under a conda
environment of python3
, running,
npm install -g itypescript
yields
config/install-sh -c -d '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin'
/bin/sh ./libtool --mode=install /usr/bin/install -c tools/curve_keygen '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin'
libtool: install: /usr/bin/install -c tools/curve_keygen /Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/bin/curve_keygen
config/install-sh -c -d '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/include'
/usr/bin/install -c -m 644 include/zmq.h include/zmq_utils.h '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/include'
config/install-sh -c -d '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/pkgconfig'
/usr/bin/install -c -m 644 src/libzmq.pc '/Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq/scripts/../zmq/lib/pkgconfig'
Succesfully build libzmq on Fri Mar 29 2019 10:05:01 GMT-0500 (Central Daylight Time)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/bpeng1/anaconda3/bin/python -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:289: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 Socket.stream.socket.on (internal/child_process.js:381:11)
gyp ERR! stack at Socket.emit (events.js:182:13)
gyp ERR! stack at Pipe._handle.close (net.js:606:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/bpeng1/anaconda3/bin/node" "/Users/bpeng1/anaconda3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/bpeng1/anaconda3/lib/node_modules/itypescript/node_modules/zeromq
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zeromq@4.6.0 install: `node scripts/prebuild-install.js || (node scripts/preinstall.js && node-gyp rebuild)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zeromq@4.6.0 install 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! /Users/bpeng1/.npm/_logs/2019-03-29T15_05_03_015Z-debug.log
so it is clearly a Python3 problem, and I am not able to check the version of iTypeScript
.