Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

wrf-python installed from conda-forge produces import error

Abierto
#110 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python
Área
build-system

Línea de trabajo

Reproduce la instalación de conda-forge en Windows 7 con el comando reportado python -c "import wrf". Lee wrf/__init__.py y wrf/config.py alrededor de la importación de _wrffortran y compara el paquete de conda con el wheel que funciona; se considera completado cuando la instalación de conda puede importar y leer un archivo NetCDF wrfout sin el fallo de DLL.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug support

Installed wrf-pyhton through conda-forge on windows 7 64 bit. Post installation, checked if the package is installed correctly using following command:-

 python -c "import wrf"

and it worked without an error. However, when I ran the script the following error is produced:-

Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wrf
Traceback (most recent call last):
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\__init__.py", line 6, in <module>
    from . import api
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\api.py", line 1, in <module>
    from .config import (xarray_enabled, disable_xarray, enable_xarray,
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\config.py", line 6, in <module>
    from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
ImportError: DLL load failed: The specified path is invalid.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\__init__.py", line 18, in <module>
    from . import api
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\api.py", line 1, in <module>
    from .config import (xarray_enabled, disable_xarray, enable_xarray,
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\config.py", line 6, in <module>
    from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
ImportError: DLL load failed: The specified path is invalid.

I am not sure what causes the problem. Could someone help on this t rectify...

Edit:-

Just to clarify that the same works on Linux version of miniconda.

Edit-2

Uninstalled latest version of wrf-python and installed older version (1.3.0). This time I am getting following error:-

Traceback (most recent call last):
  File "insdvp_app.py", line 30, in <module>
    import utils
  File "Y:\project\insdvpgit\insdvp\utils.py", line 34, in <module>
    from wrf import interplevel
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\__init__.py", line 16, in <module>
    from . import api
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\api.py", line 1, in <module>
    from .config import (xarray_enabled, disable_xarray, enable_xarray,
  File "C:\Users\Sundar\miniconda3\envs\insdvp\lib\site-packages\wrf\config.py", line 6, in <module>
    from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
ImportError: DLL load failed: The specified path is invalid.

Edit-3

Fiddled around with package from https://www.lfd.uci.edu/~gohlke/pythonlibs/. This time it successfully installed (version 1.2.0 as it was the latest at that point of time) and imported without an error. However, while reading the wrfout file, the script closed without producing an error.

To check if the problem exist in window 10, I installed the module on a freshly installed miniconda. This time it did not show any error as I have observed in windows 7. However, It simply closes without producing any error when reading a wrfout netcdf file as seen in latest try on windows 7.

Edit-4
Checked the wheel package today again at https://www.lfd.uci.edu/~gohlke/pythonlibs/#wrf_python and found the latest version 1.3.2. Uninstalled the conda version and installed whell package from link. Finally, It worked :-)

Something is wrong with conda install on windows. You guys may want to chack it out...

Lenguaje dominante
Python
Estrellas
498
Forks
178
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NCAR/wrf-python

Todos los issues de NCAR/wrf-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.