gyp verb `which` failed Error: not found: python2
时间: 2024-05-17 22:14:19 浏览: 152
breakpad编译所需资源
要解决"gyp verb `which` failed Error: not found: python2"错误,你可以按照以下步骤操作:
1. 首先,确保你已经安装了python2.7版本,并且将其配置为环境变量。你可以通过在终端中运行"python --version"命令来检查python的版本号。
2. 确保你已经安装了node-gyp。你可以使用以下命令全局安装node-gyp:npm install -g node-gyp。
3. 检查npm的python配置。你可以通过运行以下命令设置npm的python配置:npm config set python python2.7。
4. 确保你已经安装了MSVS 2017。你可以使用以下命令设置npm的msvs_version:npm config set msvs_version 2017。
5. 最后,重新运行npm install命令。
这些步骤将帮助你解决"gyp verb `which` failed Error: not found: python2"错误。请确保按照顺序执行这些步骤,并且在每个步骤完成后验证是否解决了问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [npm ERR gyp verb `which` failed Error: not found: python2](https://blog.csdn.net/weixin_45168627/article/details/122546012)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [blog:Github static blog post, experience the fun of using Issues.Welcome star( 静态博客文章,体验...](https://download.csdn.net/download/weixin_42104366/18246318)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [gyp verb `which` failed Error: not found: python2解决方案](https://blog.csdn.net/weixin_42478562/article/details/121225203)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文