成功解决gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! sta

简介: 成功解决gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! sta

解决问题


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

gyp ERR! configure error

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

gyp ERR! stack     at PythonFinder.failNoPython (G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-gyp\lib\configure.js:483:19)

gyp ERR! stack     at PythonFinder.<anonymous> (G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-gyp\lib\configure.js:508:16)

gyp ERR! stack     at G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\graceful-fs\polyfills.js:284:29

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

gyp ERR! System Windows_NT 10.0.16299

gyp ERR! command "F:\\Program Files (x86)\\node-v10.5.0\\node.exe" "G:\\USST\\Jason niu tutor\\FXTrafficSystem-web\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="

gyp ERR! cwd G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-sass

gyp ERR! node -v v10.5.0

gyp ERR! node-gyp -v v3.6.2

gyp ERR! not ok

Build failed with error code: 1

npm WARN sass-loader@6.0.6 requires a peer of webpack@^2.0.0 || >= 3.0.0-rc.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN The package express is included as both a dev and production dependency.

npm WARN The package jquery is included as both a dev and production dependency.

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

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

npm ERR! code ELIFECYCLE

npm ERR! errno 1

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

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the node-sass@4.5.3 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\99386\AppData\Roaming\npm-cache\_logs\2018-07-16T13_26_26_530Z-debug.log



解决思路


确保文件存在的gyp动词:c:\python27\python.exe gyp err!配置错误Gyp错误!






解决方法


     切记,因为我电脑上已经安装由python3.6了。环境要求python2的版本,具体为什么不用python3,我特么也纳闷,也不太清为什么必须是python2,python3版本就是不行,所以,还是重新安装python2吧……


两种方法搞定!

T1、npm install --global --production windows-build-tools

T2、自行下载

npm install --python=python2.7     #先下载

npm config set python python2.7   #再设置环境

image.png




 

相关文章
|
3月前
|
网络安全 Python
python request SSL error 403证书错误
python request SSL error 403证书错误
57 0
|
18天前
|
安全 网络安全 API
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
35 1
python调用openai api报错self._sslobj.do_handshake()OSError: [Errno 0] Error
|
1月前
|
计算机视觉 Python
python opencv:ERROR: Could not find a version that satisfies the requirement opencv ERROR:
python opencv:ERROR: Could not find a version that satisfies the requirement opencv ERROR:
27 2
|
4月前
|
数据可视化 Python
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
常见的bug---5、在安装superset时候报错,Command “python setup.py egg_info“ failed with error code 1
|
2月前
|
编解码 Python Windows
Python文件路径报错SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: t
Python文件路径报错SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 2-3: t
|
3月前
|
Python
python pymssql charset=“gbk“ b‘DB-Lib error message 20010, severity 8
python pymssql charset=“gbk“ b‘DB-Lib error message 20010, severity 8
21 0
|
7月前
|
C++ Python
【Python学习笔记】pip安装reportlab包时报错:fatal error LNK1158: cannot run ‘rc.exe‘
【Python学习笔记】pip安装reportlab包时报错:fatal error LNK1158: cannot run ‘rc.exe‘
|
9月前
|
Python
python离线安装环境 解决 ERROR: Could not find a version that satisfies the requirement xxx 以及winError[10061]
python离线安装环境 解决 ERROR: Could not find a version that satisfies the requirement xxx 以及winError[10061]
383 0
|
IDE Java 开发工具
【问题记录与解决】启动Jupyter,运行代码时报错【Error】 || 通过 Jupyter 建立的Python文件在哪儿 || Jupyter 中 移动 Python 文件 到 指定文件夹
和大家大部分遇到的问题一样,也是在启动Jupyter时,发现运行不了简单的代码,报错Error。而且对当前文件也执行不了“重命名”。
【问题记录与解决】启动Jupyter,运行代码时报错【Error】 || 通过 Jupyter 建立的Python文件在哪儿 || Jupyter 中 移动 Python 文件 到 指定文件夹
|
Python
Fatal Python error:initsite:Failed to import the site module
Fatal Python error:initsite:Failed to import the site module
458 0
Fatal Python error:initsite:Failed to import the site module

相关产品

  • 云迁移中心