Closed CollinsEM closed 6 months ago
It's actually because newer versions of python have changed this behavior.
To use cesm2.1 we recommend a virtual environment with python 3.8 and pylint 2.12.
Python 3.8 is not available on Orion. It seems like recommending a downgrade is a bit counter-productive. I'm sure that I'm not the only one that will notice this issue as more systems are upgraded to python 3.9. Would you consider making the change to the python script if I submitted a pull request?
Yes a PR would be very welcome.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
While attempting to install CESM 2.1.* on the Orion cluster at Mississippi State University, I would run the regression test script and noticed that all of the pylint checks were failing with a message similar to the following:
This seemed like a strange error to have since the sys module is fundamental to the python library and should be included in the default search path. After digging into it for a while, I finally isolated the offending line of code: Line 30 of
cime/scripts/lib/CIME/code_checker.py
30: cmd_options += " --init-hook='sys.path.extend((\"%s\",\"%s\",\"%s\"))'"%\
For some reason, this call to sys.path could not be resolved. The work-around for this was to add
import sys;
to the beginning of the string provided as the argument to--init-hook
.30: cmd_options += " --init-hook='import sys; sys.path.extend((\"%s\",\"%s\",\"%s\"))'"%\
With this one change, the pylint checks in the regression tests began passing.
I hope this helps. Please reach out if you need any additional information.