Python vtk configuration on Windows

I installed vtk from vtkpython-6.3.0-Windows-64bit.exe in C:\Program Files\VTK 6.3.0my computer. Then I add C:\Program Files\VTK 6.3.0\binto my path and C:\Program Files\VTK 6.3.0\bin, as well as C:\Program Files\VTK 6.3.0\bin\Lib\site-packagesto PYTHONPATH in the system variables. When I run IDLE (Python GUI).exePython and input import vtkit shows:

>>> import vtk
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import vtk
  File "C:\Program Files\VTK 6.3.0\bin\Lib\site-packages\vtk\__init__.py",   line 39, in <module>
    from vtkCommonCore import *
ImportError: No module named 'vtkCommonCore'
>>> 

What mistake did I make?

Please help me with this.

+4
source share
3 answers

Are you sure you have set up the environment variables correctly? For example, be careful with quotation marks (otherwise do not put them).

VTK 7 Y (, , vtkpython ), :

C:\Users\lib>set PATH=Y:\VTK 7.0.0-RC2\bin;%PATH%

C:\Users\lib>set PYTHONPATH=Y:\VTK 7.0.0-RC2\bin\Lib\site-packages

C:\Users\lib>python -c "import vtk;print vtk.__file__;print vtk.vtkVersion().GetVTKVersion()"
Y:\VTK 7.0.0-RC2\bin\Lib\site-packages\vtk\__init__.pyc
7.0.0

C:\Program Files\VTK 6.3.0\bin\Lib\site-packages\vtk PATH ( DLL)

+4

Anaconda python distro. Anaconda VTK . , VTK python 2.7.

: , VTK python 3.6

+1

32- 64- Python?

VTK, , 64- Python Windows. , 64- Python 32- .

python.org 32- Python.

0

Source: https://habr.com/ru/post/1625866/


All Articles