You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vcbuild changes current directory and fails to find python #14300
C:\Users\Nikolai\Downloads\node>python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
C:\Users\Nikolai\Downloads\node>vcbuild
Looking for Visual Studio 2017
calling: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\\Auxiliary\Build\vcvarsall.bat" amd64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26430.14
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Found MSVS version 15.0
The system cannot find the path specified.
Could not find python2
Failed to create vc project files.
C:\Users\Nikolai\Source>
The 3rd line in vcbuild.bat is cd %~dp0 so that's probably the cause of changing directory ohh vcvarsall.bat is changing your cd, that is strange, check the %ERRORLEVEL%, maybe it's failing.
Check what tools/msvs/find_python.cmd is doing with set DEBUG_HELPER=1.
Maybe your python is not an .exe but .bat? (find_python.cmd#42)
Sorry it's my ideas are coming in drips...
You can also see what vcvarsall.bat is doing with set VSCMD_DEBUG=3 (it has several levels I think 3 is the highest)
changed the title [-]vcbuild fails to find python and changes current directory[/-][+]vcbuild changes current directory and fails to find python[/+]on Jul 16, 2017
Activity
seishun commentedon Jul 16, 2017
Added some
echo %cd%in vcbuild.bat, apparently calling vcvarsall changes the current directory:Why would that happen?
refack commentedon Jul 16, 2017
Funny I was just discussing this with @gibfahn...
The 3rd line inohhvcbuild.batiscd %~dp0so that's probably the cause of changing directoryvcvarsall.batis changing yourcd, that is strange, check the %ERRORLEVEL%, maybe it's failing.tools/msvs/find_python.cmdis doing withset DEBUG_HELPER=1.Maybe your
pythonis not an.exebut.bat? (find_python.cmd#42)refack commentedon Jul 16, 2017
Maybe also try to run
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"and do aRepairorUpdateseishun commentedon Jul 16, 2017
find_python.cmd doesn't even run because the current directory is wrong. Thus the "The system cannot find the path specified." line.
I could do that, but vcbuild shouldn't fail in such an obscure way because of a broken VS installation.
refack commentedon Jul 16, 2017
Sorry it's my ideas are coming in drips...
You can also see what
vcvarsall.batis doing withset VSCMD_DEBUG=3(it has several levels I think 3 is the highest)refack commentedon Jul 16, 2017
Ack. So now we have a bug 👍
seishun commentedon Jul 16, 2017
Looks like
ERRORLEVELis set to1later andvcvarsall.batis successful:Output with
set VSCMD_DEBUG=3:[-]vcbuild fails to find python and changes current directory[/-][+]vcbuild changes current directory and fails to find python[/+]build: prevent VsDevCmd.bat from changing cwd
build: prevent VsDevCmd.bat from changing cwd
build: prevent VsDevCmd.bat from changing cwd