NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
411 stars 155 forks source link

Can no longer import wrf-python using Python 2.7 on Windows #76

Closed moptis closed 5 years ago

moptis commented 6 years ago

Hello, wrf-python has been working well until I updated the package through Conda. Now I'm getting the attached import error. If I manually add numpy.core.multiarray, then I get another error saying the 'fomp_enabled' module isn't available since the library ._wrffortran isn't found. Any thoughts?

image

bladwig1 commented 6 years ago

It looks like you've installed this to a root anaconda environment, and mixing anaconda packages with conda-forge packages can lead to bad things. Windows doesn't do a good job of reporting problems with extension modules. We strongly recommend using conda environments, particularly if you are using anaconda with conda-forge packages.

Can you please try installing wrf-python to a conda environment to see if that fixes your problem, since I am unable to reproduce the problem.

conda create -n wrf_env -c conda-forge wrf-python python=2.7
conda activate wrf_env (or activate wrf_env if your conda is old)
python
>>> import wrf

You can install any other packages that you need in to this environment from the conda-forge channel. It has everything that anaconda does.

Let me know if this fixes it.

moptis commented 6 years ago

Thanks @bladwig1 I'll give it a shot.