Hello, I’m encountering a FileNotFoundError
in my Python script when attempting to run pdflatex
using subprocess.run
. The error message indicates that the pdflatex
executable cannot be found:
FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex'
Here’s the relevant portion of my code:
subprocess.run(['pdflatex', '-output-directory', email_dir, main_tex], check=True)