Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

python - 将VTK添加到PYTHONPATH(Adding VTK to PYTHONPATH)

I am trying to import the VTK module into Python but receive the error:

(我正在尝试将VTK模块导入Python,但收到错误:)

    ModuleNotFoundError: No module named 'vtk'

I have built the library using CMake and Visual Studio and VTK appears to work when I build an example C++ file but does not import into Python.

(我使用CMake和Visual Studio构建了该库,并且在构建示例C ++文件但未导入到Python时VTK似乎可以工作。)

I have added the library locations to the system path under environment variables but I am not sure if they have been added to the PYTHONPATH.

(我已将库位置添加到环境变量下的系统路径中,但不确定是否已将它们添加到PYTHONPATH中。)

How can I check my PYTHONPATH and modify it if necessary?

(如何检查我的PYTHONPATH并在必要时进行修改?)

Using Python 3.7 on Windows 10 with PowerShell.

(在Windows 10和PowerShell上使用Python 3.7。)

  ask by RSwn translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...