I am getting error while installing latest version of appium through npm

Please help me to sort out this issue.

Could you add the logs here and the error?

C:\WINDOWS\system32>npm install -g [email protected]
C:\Users\divya\AppData\Roaming\npm\appium → C:\Users\divya\AppData\Roaming\npm\node_modules\appium\build\lib\main.js

[email protected] install C:\Users\divya\AppData\Roaming\npm\node_modules\appium\node_modules\buffertools
node-gyp rebuild

C:\Users\divya\AppData\Roaming\npm\node_modules\appium\node_modules\buffertools>if not defined npm_config_node_gyp (node “C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\…..\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\divya.windows-build-tools\python27\python.exe -c import platform; print(platform.python_version());
gyp ERR! stack File “C:\Users\divya\AppData\Local\Programs\Python\Python37-32\Lib\site.py”, line 177
gyp ERR! stack file=sys.stderr)
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
gyp ERR! cwd C:\Users\divya\AppData\Roaming\npm\node_modules\appium\node_modules\buffertools
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\appium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\divya\AppData\Roaming\npm-cache_logs\2018-07-27T10_19_48_265Z-debug.log

seems to be an issue with npm then appium itself

I have installed npm 5.6.0. Needs to be update latest version?

I got this issue today as well.
Just install 1.8.0

So, Is there any solution for this?