Can't find Python executable "D:\python3\python.exe", you can set the PYTHON env variable.

版权声明:本文为博主原创文章,欢迎转载,转载时请以超链接形式标明文章原始出处。 https://blog.csdn.net/lilongsy/article/details/82983798

报错

在win10下用npm安装appium的时候,报如下错误:

Can't find Python executable "D:\Anaconda3\python.exe", you can set the PYTHON env variable.

解决思路

1、设置python执行文件路径。
2、要用python 2.7版本

方法一

在windows下设置全局变量PYTHON为python2.7的绝对路径,例如:

D:\Anaconda2\python.exe

设置变量:

set PYTHONPATH=%PYTHON%

方法二

npm config set python D:\Anaconda2\python.exe

方法三

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

参考

https://stackoverflow.com/questions/34372618/npm-cant-find-python-executable-python-you-can-set-the-python-env-variabl
https://blog.csdn.net/weixin_36222137/article/details/78463543
https://blog.csdn.net/csxypr/article/details/81159845

猜你喜欢

转载自blog.csdn.net/lilongsy/article/details/82983798