fetch/gclient sync fails as teamcity's command line

238 Views Asked by At

fetch/gclient sync works fine from the terminal window on the Windows Server 2012 (64 bits) host. TeamCity build agent is 32bits application and I can't change it. When I try to run fetch/gclient sync as a build step it fails. Here the error messages:

New python executable in C:\Windows\system32\config\systemprofile\.vpython-root\ac0e59\Scripts\python.exe

ERROR: The executable C:\Windows\system32\config\systemprofile\.vpython-root\ac0e59\Scripts\python.exe is not functioning

ERROR: It thinks sys.prefix is u'c:\\windows\\syswow64\\config\\systemprofile\\.vpython-root\\ac0e59' (should be u'c:\\windows\\system32\\config\\systemprofile\\.vpython-root\\ac0e59')

ERROR: virtualenv is not compatible with this system or executable

Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.

Command where python outputs the next:

C:\>where python
C:\utils\depot_tools\python.bat
C:\DevTools\Python27\python.exe

So I think the main problem here:

ERROR: It thinks sys.prefix is u'c:\\windows\\syswow64\\config\\systemprofile\\.vpython-root\\ac0e59' (should be u'c:\\windows\\system32\\config\\systemprofile\\.vpython-root\\ac0e59')

and I don't have solution for it.

Any ideas how to fix it?

1

There are 1 best solutions below

1
On

It is well possible that 32-bit build hosts are not supported out of the box. I can't debug it because I don't have access to such a machine.

Try changing your %PATH% so that the system-installed Python comes before depot_tools. That might help, or it might break random other things or not work at all.

I'm afraid you'll have to invest some time into debugging this yourself. Sorry.