s=subprocess.Popen(['/home/karthik/Downloads/stanford-parser-2011-06-08/lexparser.csh','-'],stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
我确定这个文件存在,而且这个文件名的open()有效。为什么我收到此错误?我使用python 2.7
答案 0 :(得分:4)
确保csh
已安装并位于/bin/csh
中(否则请在lexparser.sh
中的shebang之后编辑命令。)