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

Marco Ippolito ippolito.marco at gmail.com
Mon Jan 6 12:20:27 EST 2014


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

running the file:

 [Found /home/ubuntu/nltk_data/megam_i686.opt:
 /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 <astrand at lysator.liu.se>
#
# 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.

Marco



More information about the Python-list mailing list