diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index f49fab58..7d071132 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -44,6 +44,7 @@ Enhancements Bug Fixes +++++++++ +- (:pr:`451`, :issue:`450`) Psi4 - Fixes bug in Psi4 detection when command `python` not available. @susilehtola, @topazus Misc. +++++ diff --git a/qcengine/programs/psi4.py b/qcengine/programs/psi4.py index 1ba3d7fa..d49a1742 100644 --- a/qcengine/programs/psi4.py +++ b/qcengine/programs/psi4.py @@ -73,7 +73,7 @@ def found(raise_error: bool = False) -> bool: psiapi = which_import("psi4", return_bool=True) if psiapi and not psithon: - with popen(["python", "-c", "import psi4; print(psi4.executable)"]) as exc: + with popen([sys.executable, "-c", "import psi4; print(psi4.executable)"]) as exc: exc["proc"].wait(timeout=30) so, se, rc = exc["stdout"].strip(), exc["stderr"], exc["proc"].returncode error_msg = f" In particular, psi4 module found but unable to load psi4 command into PATH. stdout: {so}, stderr: {se}"