Can‘t find Python executable “/path/to/executable/python2.7“, you can set the PYTHON env variable

斗米

关注

阅读 9

2024-03-19


项目执行npm install时报错,报错信息如下:

Can‘t find Python executable “/path/to/executable/python2.7“, you can set the PYTHON env variable_node.js

解决办法

设置环境变量:

  1. 打开 cmd -->
  2. 输入 path=%path%;D:\Tools\Developer\Python(python本地安装目录)

path=%path%;D:\Tools\Developer\Python

  1. 执行

npm config set python "D:\Tools\Developer\Python\python.exe"

  1. 再执行

npm install


精彩评论(0)

0 0 举报