Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

_wrffortran cannot be found after installing from source

未关闭
#208 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
fortran, python
领域
build-system

调研方向

从 src/wrf/config.py 以及通过 src/wrf/init.py 和 api.py 到达的 _wrffortran 导入开始。在报告的 Windows 和 Python 版本上重现 pip install .,检查是否生成了扩展及其依赖的 DLL;当导入 wrf 成功且没有 DLL 加载错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

pip install . runs successfully, but when importing wrf in python I get the following error:

Traceback (most recent call last):
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\__init__.py", line 6, in <module>
    from . import api
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\api.py", line 1, in <module>
    from .config import (xarray_enabled, disable_xarray, enable_xarray,
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\config.py", line 6, in <module>
    from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
ImportError: DLL load failed while importing _wrffortran: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\__init__.py", line 18, in <module>
    from . import api
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\api.py", line 1, in <module>
    from .config import (xarray_enabled, disable_xarray, enable_xarray,
  File "C:\Users\User\anaconda3\envs\wrfenv_rcapetest\Lib\site-packages\wrf-python\src\wrf\config.py", line 6, in <module>
    from ._wrffortran import (fomp_enabled, fomp_set_num_threads,
ImportError: DLL load failed while importing _wrffortran: The specified module could not be found.

I'm trying to install from source so I can have more control over the calculations in the fortran scripts. I'm happy to use conda install if there's some way to manually change the fortran calculations, but I can't see that functionality.

Versions:

  • OS: Windows 11
  • Python 3.11.3
  • numpy 1.23.5
  • wrapt 1.14.1
  • setuptools 67.7.2
主要语言
Python
星标
498
派生
178
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NCAR/wrf-python 的其他 Issue

查看 NCAR/wrf-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。