/usr/lib/python2.7/subprocess.py:OSError: [Errno 2] No such file or directory

Chris Angelico rosuav at gmail.com
Tue Jan 7 00:21:38 EST 2014


On Tue, Jan 7, 2014 at 4:20 AM, Marco Ippolito <ippolito.marco at gmail.com> wrote:
>    File "/usr/local/lib/python2.7/dist-packages/nltk/classify/megam.py",
>  line 167, in call_megam
>      p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>    File "/usr/lib/python2.7/subprocess.py", line 679, ininit
>      errread, errwrite)
>    File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>      raise child_exception
>  OSError: [Errno 2] No such file or directory
>
> subprocess.py exists:

The problem isn't inside subprocess itself, which is raising the
error. It looks like the problem is with the command being executed
via Popen. I would look in megam.py (the first line that I quoted
here) and see what the command is, and then see if you have that
installed correctly. It ought to be listed as a prerequisite.

ChrisA



More information about the Python-list mailing list