python - 如何克服无法加载 vtkClientServerPython?
问题描述
我必须在 python 中运行一些 paraview 跟踪文件来自动化这个过程。为此,我尝试将 paraview 导入为
from paraview.simple import *
但是,它向我显示了一个错误
“加载 vtkClientServerPython 失败:没有名为 vtkmodules.vtkCommonCorePython 的模块”我之前从 python 运行过 paraview,它工作正常。但是现在,这几天给我带来了一个问题。如何克服这一点?下面是代码中包含的 paraview 的完整 sys 路径。
import numpy as np
import sys, os
ParaViewBuildPath = "/home/ParaView-5.7.0-MPI-Linux-Python3.7-64bit/"
sys.path.append(ParaViewBuildPath + "lib/")
sys.path.append(ParaViewBuildPath + "lib/python3.7/site-packages")
sys.path.append(ParaViewBuildPath + "lib/python3.7/site-packages/vtkmodules")
from paraview.simple import *
解决方案
推荐阅读
- javascript - 未捕获的类型错误:$(...).modal 不是函数,无法管理正确的顺序
- javascript - 如何使用简单的 jQuery 实现星级评分,它应该在旁边显示价值
- c# - 是否可以通过检查表单提交中的单选按钮值来重定向不同的页面?
- node.js - 发布请求在 Ajax 中工作,但在 TypeScript Gaxios 中不工作
- python - 为什么我无法在基于文本的游戏中拾取物品?
- swift - Swift:如何在给定子级别的字典中设置值?
- python - 使用外差算法将超声波转换为可听声音²
- django - django-rest-framework POST 上的“此字段为必填项”
- phpmyadmin - “非法混合排序规则”错误与 phpMyAdmin 的库存安装
- c# - EF Core DBContext 缓存结果