2017-04-17 8 views
0

Ich versuche, ein Python-Skript zu verwenden, das Latex in png konvertiert. Die Bibliothek befindet sich unter https://github.com/cptdeadbones/pytex2png.OSError: [Errno 2] Keine solche Datei oder Verzeichnis mit python2.7/subprocess.py

Wenn ich den Befehl ausführen python examples.py ich die folgende Fehlermeldung erhalten:

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' 

Was bedeuten diese Fehler? Ist es ein Fehler, wie die Argumente übergeben werden?

Von der Quelle:

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() 

Gibt es einen Fehler in der Funktion oben?

+0

Diese Datei, "examples /" + file' existiert nicht? –

+0

@DmitryPolonskiy die Datei ist dort – KexAri

+0

Was ist das Betriebssystem, das Sie verwenden? – Surajano

Antwort

1

Ich hoffe, Sie haben die Verwendung wie folgt beschrieben: Usage die Makefile erstellen.

Haben Sie die Disclaimers ?? Es sagt folgendes:

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.

Verwandte Themen