python embedding error #2654
-
Hi. I would like to request assistance in configuring my Python embedding. And I get this error message:
I only get that error message if wgrib2 is not installed in my environment. I have set the MET_PYTHON_EXE environment variable to /home/met/miniconda3/envs/METplus/bin/python3. When I try to run the command in my conda environment with wgrib2 installed, it runs as expected:
But when I run it in my base environment without wgrib2 installed, it throws me the same error in my log file:
I think that even though I explicitly set the environment variable MET_PYTHON_EXE to the python executable with the wgrib2 installed, MET still uses my base environment's python. Is there a workaround for this without installing wgrib2 and pygrib in my base environment? my echo $MET_PYTHON_EXE in base environment: my echo $MET_PYTHON_EXE in conda environment: Here is my MET-11.1.0 config.log: my met.make.log: Thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Greetings! Thanks for sending your log file and details. I see this error in your first log message:
This tells me that in the Python script Looking at your Python embedding command from the log file, I see this:
So your Python embedding script looks like it is for your forecast data. I see your
So it loooks like you are passing 5 arguments to your Python script:
Are you able to share the Python script as well? I think it would be helpful to understand what the Python script is doing. The |
Beta Was this translation helpful? Give feedback.
Hi,
Thank you for the updates, it seems like you've made a lot of progress!
In order to use Python embedding with MET, even when using your own Python installation (by setting
MET_PYTHON_EXE
), MET must be compiled with a version of Python with the packages installed listed in the documentation here:https://met.readthedocs.io/en/latest/Users_Guide/appendixF.html#compiling-met-for-python-embedding
Unfortunately, it looks like your MET installation will need to be recompiled against a version of Python with those minimum set of requirements. Here is more information about installing MET:
https://met.readthedocs.io/en/latest/Users_Guide/installation.html
The key is using the
--enable-python
…