templateDir resolves to a local zppy clone instead of the conda environment #782
chengzhuzhang
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue:
v3.HR simulation analysis requires zppy features that not yet available from e3sm_unified. @xuezhengllnl and I went with the approach to use a shared environment I built locally example, using:
source /home/ac.zhang40/y/etc/profile.d/conda.sh; conda activate zppy_dev.Recently, there was a stubborn issue that
ilambtask won't run. After some iterations, we found that in ilamb.settings,templateDiris pointing to her local zppy clone directory. The cause is diagnosed that:In main.py, templateDir is computed as:
template_dir = os.path.join(os.path.dirname(file), "templates")
file resolves to wherever Python imported zppy from. If a local zppy clone is earlier in sys.path than the conda env's site-packages, the local clone wins. This can happen via:
PYTHONPATH
while using shared local build of zppy is not a common practice, I'm taking a note here that it is needed to either:
Remove the local zppy path from PYTHONPATH, or uninstall the editable install
Beta Was this translation helpful? Give feedback.
All reactions