使用 pip 在 Windows 11 上安装 python vtk 模块:“DLL 加载失败:找不到指定的模块”

问题描述 投票:0回答:1

我已使用命令将 vtk 模块安装在嵌入式 python3.7.9 文件夹中

python.exe -m pip install vtk

但是当我尝试“导入 vtk”时,出现以下错误:

from vtkmodules.vtkCommonCore import *
ImportError: DLL load failed: The specified module could not be found

我进入 Lib\site-packages tkmodules,找到“vtkCommonCore-9.2.dll”。事实上,所有 .dll 文件的名称中都包含 -9.2 限定符。

当我进入可以成功导入 vtk 的较旧安装时,我发现“vtkCommonCore.dll”和其他没有版本限定符的安装。

我认为是这个“-9.2”“限定符引起了问题。但我不明白为什么它们在旧安装中不存在。

附注我刚刚检查了工作安装的 vtk 版本,它是“9.0.1”。也许 vtk 9.2 破坏了旧版本 python 的模块?

python python-3.7 vtk
1个回答
0
投票

您在这里找到解决方案了吗?或者使用 9.0.1 对您有用吗?谢谢!

© www.soinside.com 2019 - 2024. All rights reserved.