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


Marco Ippolito

Hi everybody,
I'm trying to use MEGAM with NLTK.

running the file:

[Found /home/ubuntu/nltk_data/megam_i686.opt:
Traceback (most recent call last):
File "classifying.py", line 494, in <module>
me_classifier = MaxentClassifier.train(train_feats, algorithm='megam')
File "/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py",
line 319, in train
gaussian_prior_sigma, **cutoffs)
File "/usr/local/lib/python2.7/dist-packages/nltk/classify/maxent.py",
line 1522, in train_maxent_classifier_with_megam
stdout = call_megam(options)
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:

# subprocess - Subprocesses with accessible I/O streams
# For more information about this module, see PEP 324.
# This module should remain compatible with Python 2.2, see PEP 291.
# Copyright (c) 2003-2005 by Peter Astrand <[email protected]>
# Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details.

r"""subprocess - Subprocesses with accessible I/O streams

Any hints or suggestions?

Thank you very much for your help.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Latest member

Latest Threads