python embedding; conda env #2031
-
Dear MET_help, I have an issue about python embedding feature. When I ran grid_stat and got the following error on Cheyenne (using conda env; see error log file here : /glade/work/jban/pandac/cloud_vx/bin/MET/24.CMORPH.log_err and MET_verification_grid.o8319873):
But when I run python_script_fcst.py separately (even though it’s nonmeaningful ), it works for import “python_stuff”. Any ideas of fixing this error are welcome. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
Hi @junmeiban, when you run a Python Embedding script in MET, it uses the version of Python that was installed with the MET tools by default. You can set the MET_PYTHON_EXE environment variable to the full path of another python3 binary to use that version of Python to run your script in MET. If the version of python3 in your path is the one you want to use, you can set:
FYI, starting in the upcoming MET 11.1.0 release, the version of Python that is being used by the commands will be logged so it will be much easier to tell what is being used. Please let me know if this resolves your issue or if you need additional assistance. |
Beta Was this translation helpful? Give feedback.
Hi @junmeiban, when you run a Python Embedding script in MET, it uses the version of Python that was installed with the MET tools by default. You can set the MET_PYTHON_EXE environment variable to the full path of another python3 binary to use that version of Python to run your script in MET. If the version of python3 in your path is the one you want to use, you can set:
export MET_PYTHON_EXE=
which python3`FYI, starting in the upcoming MET 11.1.0 release, the version of Python that is being used by the commands will be logged so it will be much easier to tell what is being used.
Please let me know if this resolves your issue or if you need additional assistance.