Skip to content

Suggest a change setting default interpreter to sys.executable #222

@hansonmcoombs

Description

@hansonmcoombs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions