gpt4 book ai didi

python 子进程抛出错误 "no such file or direcrory"

转载 作者:太空狗 更新时间:2023-10-30 03:07:05 25 4
gpt4 key购买 nike

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

最佳答案

确保 csh 已安装并且位于 /bin/csh 中(否则在 lexparser.sh 中的 shebang 之后编辑命令)。

关于python 子进程抛出错误 "no such file or direcrory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6330705/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com