-
Subscribe to this blog in a reader
... or click here to be notified of new blog posts by email.
twitter.com/cpbotha
- Now dumping Gnome 3 after having dumped Unity on Ubuntu 11.10. CairoDock + GnomeDo combo fits my brain better. 1 week ago
- @dr_tj much appreciated! I transfer as much as possible of the positive vibes to the poor first authors. They were so young! 1 week ago
- @dr_tj @scheidegger @eagereyes @alark 3 eurovis rejects. tonight is a terribly sad night. 1 week ago
Friends’ latest blogs
Recent Comments
- h on Google Calendar to Palm Desktop conversion
- FNSF on What is love? [Weekly Head Voices #64 no #65]
- cpbotha on What is love? [Weekly Head Voices #64 no #65]
- Stéfan van der Walt on What is love? [Weekly Head Voices #64 no #65]
- Andrzej on Processing + NyARToolkit + multiple marker tracking
-
Recent Posts
- What is love? [Weekly Head Voices #64 no #65]
- Slow philosophy. [Weekly Head Voices #64]
- Astropsychonaut. [Weekly Head Voices #63]
- You have beautiful ize. [Weekly Head Voices #62]
- Happiness slingshot. [Weekly Head Voices #61]
-
Python 2.5 enabled VTK 5.2 Windows binaries
You can always check my Latest VTK Windows binaries page to make sure you have the latest blog posting and hence the latest binaries.
I’ve made available my home-baked VTK 5.2 Windows binaries. These have my special python-exception-patches integrated and have been built with Visual Studio 2005 (8.0) SP1 on Windows XP2 with full Python 2.5 support. Get the binaries (or my patched source) by going here. You want the binaries if you want to use VTK from Python.
IMPORTANT: you might have to install the MS VS2005 vcredist_x86 package (free!) if you want to use these DLLs (thanks Jelle for pointing this out). This might not be necessary if you already have one or more of the MS development environments installed.
Please leave a comment on this blog posting if you use these or just hate them. It’s almost like postcard-ware, but with blog comments. Please also link to this page and not directly to the download location, thanks!
To use this from Python, you need to add the following to your PATH:
- d:\opt\VTK\bin
You also need to add all of the above to PYTHONPATH, as well as the following:
- d:\opt\VTK\lib\site-packages
… where d:\opt is the drive and directory where you unpacked the ZIP file.
Once you’ve done this and logged out and in again, “import vtk” should work at the Python prompt. Shameless plug: you can use my free envedit software to do the environment editing. It beats the default XP editing thingy.
Related posts:
- Python 2.5 enabled VTK 5.4 Windows binaries
- Python-enabled VTK 5.1 and ITK 3.2 Windows binaries
- Python 2.6 enabled VTK 5.4 Windows binaries
- Adding ErrorEvent handlers to all VTK objects in Python
- Emacs Python folding fixed
19 Responses to Python 2.5 enabled VTK 5.2 Windows binaries
Great work. I’ve finally managed to build everything from source and get it working myself, but this is really handy!
awesome. thank you.
Hi,
This is very helpful. Can you explain step by step about how to add PATH like:
=======================================
To use this from Python, you need to add the following to your PATH:
* d:\opt\VTK\bin
You also need to add all of the above to PYTHONPATH, as well as the following:
* d:\opt\VTK\lib\site-packages
=======================================
Thanks a lot.
Hi!
First of all, I am to thank you for your vtk dll’s. I have been trying to compile and build from source with MinGw first, Cygwin secondly, and Cmake for 2 days but I fail to achieve vtk wrapping python installation on my XP os. So thank’s again.
However, I want to create a tk widget to render into and pack it in a python Pmw GUI. But there is a dll missing, vtkRenderingPythonTkWidgets.dll, to instanciate it.
Any help please?
Best regards.
Guy
Thank you, it is very useful.
Thanks a lot! Works very well with Python 2.5.2!
I’ve to thank you for these binaries. It was impossible to compile with g++ here. That said, I’m having some problems here, look:
Traceback (most recent call last):
File “”, line 1, in
import vtk
File “C:\vtk\lib\site-packages\vtk\__init__.py”, line 41, in
from common import *
File “C:\vtk\lib\site-packages\vtk\common.py”, line 9, in
from vtkCommonPython import *
ImportError: DLL load failed: Module not found.
Since tha PATH and the PYTHONPATH are already ok, what should I do?
@Rafael Goncalves:
Your PATH should contain C:\vtk\bin and your PYTHONPATH should contain *both* c:\vtk\bin;c:\vtk\lib\site-packages
Is this the case?
Are you also sure that you have the vcredist package installed?
Hi cpbotha,
It’s very good that these packages run well under python25! You are great! But when I cake sth. with itk3.8 package and then build in vs2005, there is an error like this:
2>Cannot find SWIG Lib directory. Checked:
2> C:/build/jwd/archive/Insight/Utilities/CableSwig/SWIG/Lib
I checked the itk package, and found in the fiel “gdcmConfigure.h” there is a line
#define PUB_DICT_PATH “C:/build/jwd/inst/Insight/share/gdcm/”
and in the file “vcl_where_root_dir.h”
#define VCL_SOURCE_ROOT_DIR “C:/build/jwd/archive/Insight/Utilities/vxl”
I wish to know are there any other files influencing the later cmaking vcproj file. And do you have any other better ideas than change by hand?
Yes, thats the case.
Lukas:
How did you manage to compile it? I’ve tryed with mingcw and VS9 but it went wrong all the times.
@Rafael:
I’ve compiled several versions of VTK without any problems in VS8 (2005). Are you using CMake?
To Lukas:
Have you tried to compile ITK in VS2005 using CMake? I have compiled ITK for general python environment. But when I setted ITK_USE_REVIEW and USE_WRAP_ITK to ON , there are several errors…
Hello,
I followed your instructions and installed vcredist. the folder is included in the path:
C:\Documents and Settings\gdc229>echo %PATH%
…C:\gfortran\bin;C:\VTK-5
.2-Py25-VS8sp1-cpbotha.net\VTK\bin
C:\Documents and Settings\gdc229>echo %PYTHONPATH%
C:\VTK-5.2-Py25-VS8sp1-cpbotha.net\VTK\bin;C:\VTK-5.2-Py25-VS8sp1-cpbotha.net\VTK
\lib\site-packages
import vtk works
from vtkCommonPython import * -> No module named vtkCommonPython
do you have any ideas? I’ve never come across any package as difficult to install as vtk.
thank you very much for providing this prebuild package, I already tried many times to build it, never worked for me.
Hi,
another comment: even though I cannot run the examples under www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html
mayavi works fine, this was my main goal.
again, thank you very much for providing the library!
I’m trying this under Windows 2000 installed under Microsoft Virtual PC 2007. I tried “import vtk” from the python prompt but get an unable to find dll error as msvcr80.dll is missing. Unfortunately vcredist_x86.exe fails to install the dll’s as it comes up with a Windows Installer error due to another missing dll.
Do you think I can simply copy over msvcr80.dll from XP?
msvcr80.dll from my XP installation didn’t work but I downloaded msvcr80.dll and msvcp80.dll from the www.dll-files.com website and that has got me a bit further along – still haven’t got a Mayavi/mlab app
running properly yet but I did get a window flash up and then close so
the missing dll errors have gone away.
@Brennan:
I’m glad that you managed to solve the DLL problem. You could try starting up MayaVi from a cmd window, hopefully you’ll see some more error output helping you to diagnose the problem.
Hello Charl!
Thanks for the binaries, they were very helpful!
If you know where I can get these kinds of binaries for Python 2.7 as well, please let me know.
Thanks,
Ram Rachum.
Hiiiii
How to add the path you mentioned above.
please elaborate this……
i want to install mayaVi…………pls help