【发布时间】:2017-06-05 10:46:48
【问题描述】:
我尝试从源代码构建 Ninja。我做到了:
$ git clone git://github.com/martine/ninja.git && cd ninja
$ git checkout release
然后在 Visual Studio 命令行中,我使用 Python 运行 configure.py:
$ C:\Python27\python.exe configure.py --bootstrap
但在这里我得到以下错误:
C:\ninja>C:\Python27\python.exe configure.py --bootstrap
bootstrapping ninja...
Traceback (most recent call last):
File "configure.py", line 320, in <module>
if platform.msvc_needs_fs():
File "configure.py", line 84, in msvc_needs_fs
stderr=subprocess.PIPE)
File "C:\Python27\Lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\Lib\subprocess.py", line 640, in _execute_chi
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
阅读this 答案后,我将shell=True 添加到configure.py 中的所有call() 和check_call()。但这仍然没有帮助。
有什么想法吗?
【问题讨论】:
标签: python python-2.7 subprocess ninja