Last month, I had to reinstall my laptop because of disk failure. Today, when I try to compile my SPFx (SharePoint Framework) project, I encounter “phyton2” not found exception. In fact, when I read the exception it was thrown by gyp npm component. This component apparently requires phyton to be installed . I can not find anywhere in SPFx documentation, the instruction to install phyton – although this will be triggered by the tooling.
According to the gyp documentation, the solution is simple.
- Open cmd using elevated privileged
- Run “npm install –global –production windows-build-tools“