首页
关于
随笔
作品
专题
邻居
开源
搜索
取消
首页
随笔
解决 Error: Can't find Python executable "python", you can set the PYTHON env variable
解决 Error: Can't find Python executable "python", you can set the PYTHON env variable
技术知识
•
2020-06-18 15:50:57
•
阅读 17187 次
# 问题 > 我们在执行` npm install ` 或 `yarn`命令的时候有时会遇到错误 ```sh Error: Can't find Python executable "python", you can set the PYTHON env variable ``` 进而导致安装部分包错误,今天带大家简单快捷地100%解决这个问题 # 解决方法 - windows 平台下,管理员权限执行以下命令,安装完即可: ```sh npm install --global --production windows-build-tools ``` - 其他平台,访问 [https://github.com/nodejs/node-gyp](https://github.com/nodejs/node-gyp) ```sh npm install --global node-gyp ```
前端
运维
您可能感兴趣的
在 Linux 下 运行npm install 出现报错 Please try running this command again as root/Administrator
1、在命令前加上 sudo 2、sudo npm install --unsafe-perm=true 3、sudo npm install --unsafe-perm=true --allow-root
在 Linux 下 运行 sudo npm install 出现报错 sudo: npm:command not found
1、输入`which npm`可以得到 自己安装的npm位置 2、建立链接3、sudo ln [option]
yarn安装常用命令与修改镜像源方法,并与npm命令比较
国内使用 yarn 速度很慢,默认是去 npm/yarn 官方镜像源获取需要安装的具体软件信息,你可以重新修改镜像源。与npm命令比较
Top