-
Notifications
You must be signed in to change notification settings - Fork 104
Description
I was having an issue where my interpreter could not identify "python" as the default interpreter (e.g. in commands = ['python {file}.py'])
as of line 1560 which is in pythontex3.run_code. Errors would pop up with the Popen calls.
This was context dependent (depending on wheter I ran the this via the command line vs via an IDE).
Suggested fix.
Instead of using "python" as the default call, use sys.executable, which is the absolute path used to interpret pythontex3.py. This would ensure that changes in scope will not lead to changes in functionality.
Obviously this would also be fixed by --interpreter calls, but my IDE does not allow addtional flags for this package (not your problem I know). Alternativly interpreter= could be passed in the package options.