This works if you are in an environment where python always refers the current running python. This is not necessarily the case in a jupyter notebook that is using a loaded conda kernel.
A safer way to do this would be
return f"{sys.executable} {run_vasp_custodian_file}"
This works because explicitly calling the python from the appropriate conda environment will handle imports/etc cleanly.
How can we easily reproduce the issue?
Any vasp calculator call with custodian in jupyter if the process that launched jupyter does not have custodian installed.
Details about the quacc environment
What is the issue?
The vasp w/ custodian calculator has the ASE calculator make a subprocess that calls custodian with
python
: https://github.com/Quantum-Accelerators/quacc/blob/main/src/quacc/calculators/vasp/vasp.py#L176This works if you are in an environment where
python
always refers the current running python. This is not necessarily the case in a jupyter notebook that is using a loaded conda kernel.A safer way to do this would be
return f"{sys.executable} {run_vasp_custodian_file}"
This works because explicitly calling the python from the appropriate conda environment will handle imports/etc cleanly.
How can we easily reproduce the issue?
Any vasp calculator call with custodian in jupyter if the process that launched jupyter does not have custodian installed.