windows-build-tools icon indicating copy to clipboard operation
windows-build-tools copied to clipboard

Fail to compile module if %USERPROFILE% contains non-ASCII character

Open jimmylab opened this issue 7 years ago • 2 comments

Is there any way to set python install path manually? The installation of windows-build-tools seems successful, however, it comes to error when compiling module: Error: spawn C:\Users\�ѻ�.windows-build-tools\python27\python.exe ENOENT

jimmylab avatar Sep 23 '18 19:09 jimmylab

This might be an issue with node-gyp and not windows-build-tools. node-gyp does not work well with non-ASCII paths: https://github.com/nodejs/node-gyp/issues/1520 .

@jimmylab as a workaround, this might work if you find the short 8.3 name for your user name and set the python path with

npm config set python PATH

joaocgreis avatar Sep 25 '18 04:09 joaocgreis

@joaocgreis Thanks for your reply. Change the python variable in npm with

npm config set python C:\python27
or
npm -g config set python C:\python27

still get the error: gyp ERR! stack Error: spawn C:\Users\�ѻ�.windows-build-tools\python27\python.exe ENOENT

I made a Junction from %USERPROFILE%.windows-build-tools\python27 to C:\python27

BTW, my username is too short to have 8.3 a name, and it seems very tricky to force enable 8.3 name (running cmd in recovery mode, filesystem modified).

jimmylab avatar Oct 08 '18 12:10 jimmylab