成功解决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




 

相关文章
|
1月前
|
开发者 Python
Python学习九:file操作
这篇文章是关于Python文件操作的详细教程,包括文件的打开、读写、关闭,以及文件备份脚本的编写和文件定位操作。
21 2
|
1月前
|
JSON 并行计算 数据格式
Python Error 汇总
本文汇总了Python编程中常见的错误及其解决办法,包括导入错误、类型错误、运行时错误等,并提供了详细的解决方案。
113 0
Python Error 汇总
|
1月前
|
存储 安全 Java
Python File处理详解!
本文详细介绍了Python文件处理的方法及其优缺点。通过`open()`、`read()`、`write()`和`append()`等函数,Python能够轻松实现文件的创建、读取、写入及追加等操作。文章还展示了如何使用`tell()`获取文件指针位置,并提供了涵盖文件创建、读取、追加、重命名及删除的完整示例。Python文件处理不仅功能强大且跨平台兼容,但也存在易错性、安全风险及处理大文件时的性能问题。适合数据存储、配置管理和数据分析等多种应用场景。
43 4
|
1月前
|
并行计算 Python
Python错误笔记(一):CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up env
这篇文章讨论了CUDA初始化时出现的未知错误及其解决方案,包括重启系统和安装nvidia-modprobe。
137 0
|
2月前
|
缓存 Python
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-npf9报错
|
3月前
|
TensorFlow 算法框架/工具 iOS开发
【Python-Tensorflow】ERROR: Could not find a version that satisfies the requirement tensorflow
本文讨论了在安装TensorFlow时遇到的版本兼容性问题,并提供了根据Python版本选择正确pip版本进行安装的解决方法。
350 1
|
3月前
|
Linux Python Windows
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
【Azure 环境】Windows中安装Python azure-eventhub-checkpointstoreblob-aio模块时出错 ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory:
|
3月前
|
Python
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
python 升级后 yum 无法使用 File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: `/usr/libexec/urlgrabber-ext-down`
34 0
|
3月前
|
iOS开发 MacOS Python
Electron Mac 打包报 Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT 解决方法
Electron Mac 打包报 Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT 解决方法
|
4月前
|
开发者 Python
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
310 0
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme