close

[Solved] Can’t find Python executable “python”, you can set the PYTHON env variable

I am trying to NPM package but I am facing the following error in my terminal: Can’t find Python executable “python”, you can set the PYTHON env variable in nodejs. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How Can’t find Python executable “python”, you can set the PYTHON env variable Error Occurs?

I am trying to NPM package but I am facing the following error in my terminal:

Can't find Python executable "python", you can set the PYTHON env variable

So here I am writing all the possible solutions that I have tried to resolve this error.

How To Solve Can’t find Python executable “python”, you can set the PYTHON env variable Error?

  1. How To Solve Can't find Python executable “python”, you can set the PYTHON env variable Error?

    To Solve Can't find Python executable “python”, you can set the PYTHON env variable Error You just need to Install Python In Your Windows ( If Not Installed ) and then add python to your PATH variable. Using environment variable. OR You can set npm config set python path and it will also Solve your error. Just run this command in your terminal: npm config set python E:\Programm Files\Python\python.exe And Now, Your error must be solved.

  2. Can't find Python executable “python”, you can set the PYTHON env variable

    To Solve Can't find Python executable “python”, you can set the PYTHON env variable Error You need to install windows-build-tools and then Your error will be solved. Just run this command in your terminal: npm i windows-build-tools And Now, Your error will be solved. Thank You.

Solution 1: Install windows-build-tools

You need to install windows-build-tools and then Your error will be solved. Just run this command in your terminal.

npm i windows-build-tools

And Now, Your error will be solved. Thank You.

Note: Node.js now includes build tools for Windows. You probably no longer need a windows-build-tools tool.

Solution 2: set PATH variable

You just need to Install Python In Your Windows ( If Not Installed ) and then add python to your PATH variable. Using environment variable.

OR

You can set npm config set python path and it will also Solve your error. Just run this command in your terminal.

npm config set python E:\Programm Files\Python\python.exe

And Now, Your error must be solved.

Conclusion

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment