找不到python2018解释器_节点JS抛出错误“找不到Python可执行文件”,即使Python解释器可以从项目目录访问时也是如此...

****我正在研究节点.Js需要Python才能使应用程序正常运行的项目。在我的节点项目目录中运行命令“npm install”后,项目抛出了一个错误,起初似乎很容易修复找不到Python可执行文件。”在以3种不同的方式设置Python环境路径,并成功地从项目路径访问Python解释器之后,它仍然抛出这个错误。但我可以在命令行中输入“python”并启动解释器。还有另一个关于ELifecycle的错误,即使在google和搜索StackOverflow之后,我还是不知道。以下是我的命令行的输出代码作为参考。另外,我编辑了不同的路径或类似的东西,只是因为我不喜欢在我的电脑里向世界广播路径。***C:\Users\\npm install

Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location

try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

npm config set proxy http://example.com:8080

gyp info it worked if it ends with ok

gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',

gyp verb cli 'C:\\Users\\\\node-gyp.js',

gyp verb cli 'rebuild',

gyp verb cli '--verbose',

gyp verb cli '--libsass_ext=',

gyp verb cli '--libsass_cflags=',

gyp verb cli '--libsass_ldflags=',

gyp verb cli '--libsass_library=' ]

gyp info using node-gyp@3.6.2

gyp info using node@8.9.4 | win32 | x64

gyp verb command rebuild []

gyp verb command clean []

gyp verb clean removing "build" directory

gyp verb command configure []

gyp verb check python checking for Python executable "C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"" in the PATH

gyp verb `which` failed Error: not found: C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"

gyp verb `which` failed at getNotFoundError C:\Users\\Desktop\Work\\node_modules\which\which.js:13:12)

gyp verb `which` failed at F C:\Users\\Desktop\Work\\node_modules\which\which.js:68:19)

gyp verb `which` failed at E C:\Users\\Desktop\Work\\node_modules\which\which.js:80:29)

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\which\which.js:89:16

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\isexe\index.js:42:5

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\isexe\windows.js:36:5

gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)

gyp verb `which` failed C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe" { Error: not found: C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"

gyp verb `which` failed at getNotFoundError C:\Users\\Desktop\Work\\node_modules\which\which.js:13:12)

gyp verb `which` failed at F C:\Users\\Desktop\Work\\node_modules\which\which.js:68:19)

gyp verb `which` failed at E C:\Users\\Desktop\Work\\node_modules\which\which.js:80:29)

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\which\which.js:89:16

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\isexe\index.js:42:5

gyp verb `which` failed at C:\Users\\Desktop\Work\\node_modules\isexe\windows.js:36:5

gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:152:21)

gyp verb `which` failed stack: 'Error: not found: C:\\Users\\\\Programs\\Python\\Python36\\;C:\\Users\\\\Programs\\Python\\Python36\\python.exe;"C:\\Users\\\\Programs\\Python\\Python36\\python.exe"\n at getNotFoundError (C:\\Users\\\\node_modules\\which\\which.js:13:12)\n at F (C:\\Users\\\\node_modules\\which\\which.js:68:19)\n at E (C:\\Users\\\\node_modules\\which\\which.js:80:29)\n at C:\\Users\\\\node_modules\\which\\which.js:89:16\n at C:\\Users\\\\node_modules\\isexe\\index.js:42:5\n at C:\\Users\\\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:152:21)',

gyp verb `which` failed code: 'ENOENT' }

gyp verb could not find "C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"". checking python launcher

gyp verb could not find "C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"". guessing location

gyp verb ensuring that file exists: C:\Python27\python.exe

gyp ERR! configure error

gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python\Python36\;C:\Program Files\Python\Python36\python.exe;"C:\Program Files\Python\Python36\python.exe"", you can set the PYTHON env variable.

gyp ERR! stack at PythonFinder.failNoPython (C:\Users\\node_modules\node-gyp\lib\configure.js:483:19)

gyp ERR! stack at PythonFinder. (C:\Users\\node_modules\node-gyp\lib\configure.js:508:16)

gyp ERR! stack at C:\Users\\node_modules\graceful-fs\polyfills.js:284:29

gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)

gyp ERR! System Windows_NT 10.0.16299

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="

gyp ERR! cwd C:\Users\\node_modules\node-sass

gyp ERR! node -v v8.9.4

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok

Build failed with error code: 1

npm WARN redux-form@6.8.0 requires a peer of react@^15.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN upstar_music@1.0.0 No description

npm WARN upstar_music@1.0.0 No repository field.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the node-sass@3.13.1 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\\AppData\Roaming\npm-cache\_logs\2018-03-23T22_07_09_160Z-debug.log

我安装了许多不同的节点包,以运行一个预先创建的程序,这是我的编码教练。我不知道如何解决输出中的两个特定部分。第一个是关于“设置PYTHON env变量”,第二个是关于“ELIFECYCLE”的东西,我从未听说过。以下是我为解决这两个问题所做的工作:

1)我已经安装了Python,Python版本是Python 3.6.4,日期是“2017年12月19日”。从节点项目的位置,我已经可以在命令行中输入“python”,然后python解释器出现:“python3.6.4(v3.6.4……)。。。。。。。等等)。键入“帮助”、“版权”或“许可证”以获取更多信息“'”。

-这就是第一个错误对我来说没有意义的地方。当我可以清楚地输入Python并打开解释器时,怎么可能找不到Python的可执行文件???我不明白什么???很明显我有什么不对劲,但我不知道是什么。在

2)我尝试过多种不同的安装python和设置路径的方法,实际上是3。首先,在CMD窗口中使用“set”命令(这不是我想要的方式,因为每次打开CMD行时都必须设置该参数)。其次,我使用控制面板设置它,这样做之后我也可以打开PYthon解释器。第三,我卸载了Python,在我进行一个干净的安装时,我选中了“addpythontosystemvariable”框。从那以后,从CMD行运行python解释器就没有问题了。在

3)我在堆栈溢出中搜索了关于这个特定错误的许多不同问题,其中似乎有很多,但是使用我已经使用过的3种方法中的任何一种进行了升级的解决方案对我来说都不起作用。而且,其他被问到的问题似乎都得到了解决,因为他们无法将python解释器从他们的项目路径(我可以这样做)。所以,我不确定命令行是否正确地识别了错误。(我不知道,在这些事情上我是个十足的傻瓜)。在

4)我在互联网上搜索过什么是“ElifeCycle”。。。。但我根本不知道这个错误指的是什么。在

所以我希望你们能帮助我解决这两个关于Python错误和“ELIFECYCLE”错误的问题,这两个错误在我上面的命令行输出中概述。在

非常感谢您抽出时间来阅读这篇文章。我知道这可能只是简单的事情。但我已经到了穷途末路了。我花了5个多小时想弄清楚,结果什么都没用。谢谢您!在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值