metview-python
metview-python copied to clipboard
Can't import metview in python using jupyter notebook
Hello, I'm having trouble on importing metview in python on MacOS. I have followed all the step from this website https://metview.readthedocs.io/en/latest/install.html#install. I have used conda to install both metview and metview-python, and when I type import metview as mv I ge the error message below
Exception: Command "metview" did not respond within 20 seconds. This timeout is configurable by setting environment variable METVIEW_PYTHON_START_TIMEOUT in seconds. At least Metview 5 is required, so please ensure it is in your PATH, as earlier versions will not work with the Python interface.
Any help would be appreciate.
Hi @XYSunPSU,
Can you make sure that you are in the conda environment where you installed metview before starting the Jupyter environment? That could be a possible cause of the problem. Also, have you tried starting metview by itself, i.e. just by typing 'metview' on the command line? If that does not work, then it also will not work from Jupyter, and it could lead to some clues, especially if you try to start it with 'metview -slog'.
Best regards, Iain
Thank you for replying so quick.
Here what I had in my base conda environment, metview 5.6.0 he67cac8_1 conda-forge metview-python 1.12.0 pyhd8ed1ab_0 conda-forge
And here what I got by only typing "metview",
metview: Found several metview cache directories:
metview:
metview: drwxr-xr-x 2 sun staff 64 Jul 12 16:56 /var/folders/41/3zcvlxzx5g1_63tkqm9s7mm80000gn/T/mv.50184.sun
metview:
metview: Old ones can be removed with 'rm -rf
And the attached file shows the error by typing "metview -slog"

I have no idea how to fix this problem.
Hi, thanks for that, it was useful.
Could you try to install package openssl version 1.1.1? You might have a different version installed. Best regards, Iain
Hi, I have downloaded openssl and it version is openssl 1.1.1q hca72f7f_0
But I tried again with both python3 -m metview selfcheck command and import metview as mv, there is still the same problem.
Thanks