[TIMOB-2427] Scons fails on win7 64bit

GitHub Issuen/a
Resolution Date2011-04-15T03:19:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
Labelsbuild, compile, git, scons
ReporterOpie Cyrus
AssigneeReggie Seagraves


Windows 7 64bit
Scons v1.2.0.r3842
Git for Windows
Python 2.6.6 (win32)

When running scons you get the following error:

scons: Reading SConscript files ...
WindowsError: [Error 2] The system cannot find the file specified:
File "C:\dev\appcelerator\titanium_mobile\SConstruct", line 6:

import package

File "c:\dev\appcelerator\titanium_mobile\site_scons\package.py", line 25:

p = subprocess.Popen(["git","show","--abbrev-commit"],stderr=subprocess.PIPE

, stdout=subprocess.PIPE) File "C:\Python26\lib\subprocess.py", line 623:

errread, errwrite)

File "C:\Python26\lib\subprocess.py", line 833:


If you add the shell=True argument to the Popen() call in both site_scons\package.py and Sconstruct the error does not present itself and the build will run.


  1. kevinorleon (at gmail) 2011-04-15

    The reason should be that git.exe is not in your system PATH. So just add /path_to_git.exe/ to your path. The problem should be solved.

  2. Opie Cyrus 2011-04-15

    Resolved - user error. Path was pointing to \cmd directory rather than \bin directory and thus causing the python call to fail but still allowing "git" command to be used without issue on the command line.

  3. hal 2011-04-15


    It is not quite a user error, but admittedly it's not a Titanium error.

    The msysGit installer adds the git directory path\to\git\cmd to the %PATH% system variable automatically. Modifying this path to path\to\git\bin does indeed allow scons to reach a more advanced position, although I still haven't got it working. :/

  4. hal 2011-04-15

    For other users experiencing this issue, here is the solution.

    The path in my post above must be corrected as I have explained.

    Furthermore, the following system variables need to be set (I use my own actual paths as an example, but obviously they will be different on your system):

       %android_sdk% = C:\Program Files (x86)\Android\android-sdk-windows
       %JAVA_HOME% = C:\Program Files (x86)\Java\jdk1.6.0_23

    Having spoken to one of the scons developers, contrary to what may have been said on the appcel website, spaces in paths to the python libs and JDK should not cause problems. If it does, it's important to file a bug with scons, as windows is one of their primary supported platforms.

    Hope this helps someone!

  5. hal 2011-04-15

    By the way, just one more thing to add. The Scons installer did not find 64bit python on my system, so I uninstalled python and installed the 32bit version, and it installed successfully. I mention this for completeness's sake.

  6. Lee Morris 2017-03-09 Closing ticket as invalid.

JSON Source