Skip to content
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

Userscripts default to /bin/python3 #490

Open
jo-basevi opened this issue Aug 21, 2024 · 0 comments · May be fixed by #491
Open

Userscripts default to /bin/python3 #490

jo-basevi opened this issue Aug 21, 2024 · 0 comments · May be fixed by #491
Assignees

Comments

@jo-basevi
Copy link
Collaborator

Python user scripts with interpreter shebang #!/usr/bin/env python3 are run using /bin/python3 during PBS run jobs. Currently the only way to run python scripts with the same python interpreter used to run payu, is to set user script to a non-executable python file without a header, and the script is run using sys.executable:

EXTENSION_TO_INTERPRETER = {'.py': sys.executable,

To run scripts with python executable that is used to run payu, one option could to modify environment variable $PATH on user script subprocess calls with the directory of sys.executable - the python executable used to run payu. An alternative could be to add the existing environment variable$PAYU_PATH to $PATH.

Would welcome any ideas as I am not really sure on the best way to go about this

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

Successfully merging a pull request may close this issue.

1 participant