当我./fasttext
从终端运行时,它运行良好。但是当我尝试它时,subprocess.check_output('./fasttext')
它给出的错误是。
错误
CalledProcessError
Traceback (most recent call last)
<ipython-input-11-a048dbef034f> in <module>()
1 from subprocess import check_output
2 from subprocess import call
----> 3 a1 = check_output('./fasttext')
4
5 #a = check_output('./fasttext print-sentence-vectors ~/Vaiju/Project/all code and data/My Code/TrainedModels/wiki_unigrams.bin < 1fasttext.test.txt')
/home/vaijenath/anaconda2/lib/python2.7/subprocess.pyc in check_output(*popenargs, **kwargs)
571 if cmd is None:
572 cmd = popenargs[0]
--> 573 raise CalledProcessError(retcode, cmd, output=output)
574 return output
575
CalledProcessError: Command './fasttext' returned non-zero exit status 1
我与笔记本中的 fasttext 位于同一目录中。