2017-04-17 9 views
0

Latexpngに変換するPythonスクリプトを使用しようとしています。図書館はhttps://github.com/cptdeadbones/pytex2pngです。私はpython examples.pyは、私は次のエラーを取得するコマンドを実行するとOSError:[Errno 2] python2.7/subprocess.pyのファイルまたはディレクトリがありません

Traceback (most recent call last): 
    File "./examples.py", line 14, in <module> 
    main() 
    File "./examples.py", line 11, in main 
    pytex2png.convert("examples/"+file,"output/"+file+".png") 
    File "/Users/kekearif/Desktop/pytex2png-master/pytex2png.py", line 44, in convert 
    make_transparent_bg(output,display) 
    File "/Users/kekearif/Desktop/pytex2png-master/pytex2png.py", line 31, in make_transparent_bg 
    exe_command(command_line) 
    File "/Users/kekearif/Desktop/pytex2png-master/pytex2png.py", line 11, in exe_command 
    p = subprocess.Popen(args,stdout=subprocess.PIPE) 
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 390, in __init__ 
    errread, errwrite) 
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1024, in _execute_child 
    raise child_exception 
OSError: [Errno 2] No such file or directory' 

このエラーは何を意味するのでしょうか?引数がどのように渡されているのかは間違っていますか?ソースから

:上記の機能に誤りが

def exe_command(cmd, display=False): 
    args = shlex.split(cmd) 
    if(display): 
     p = subprocess.Popen(args) 
    else: 
     p = subprocess.Popen(args,stdout=subprocess.PIPE) 
    p.wait() 

ありますか?

+0

このファイル、 "examples /" + file "は存在しません。 –

+0

@DmitryPolonskiyファイルがあります – KexAri

+0

使用しているOSは何ですか? – Surajano

答えて

1

ここに記載されているように、使用方法に従ってください。Usage Makefileを作成してください。

Disclaimersをチェックしましたか?

This code was devloped and tested on a Linux based system. I have no idea if it will work on another system. If you have tested it on another system, please let me know.

関連する問題