Popen报告错误:WindowsError:[错误2]系统找不到指定的文件

时间:2013-11-11 07:28:55

标签: python popen

cmd = ['scons', '-c', 'SHARED=yes', 'STATIC=yes']

当我尝试执行subprocess.Popen(cmd)时,只是得到了如下错误提示:

scons -c SHARED=yes STATIC=yes

Traceback (most recent call last):
  File "setup.py", line 37, in <module>
    if Popen(cmd).wait():
  File "D:\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "D:\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

我对此完全感到困惑,是否有人可以帮助我搞清楚?我只是Python的新手,感谢你们!

0 个答案:

没有答案