8000 Suggest a change setting default interpreter to sys.executable · Issue #222 · gpoore/pythontex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hansonmcoombs opened this issue Feb 28, 2025 · 0 comments
Open

Comments

@hansonmcoombs
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0