On Jul 24, 5:03 am, Robert Kern <robert.k...@gmail.com> wrote: > On 2009-07-23 03:55, Helvin wrote: > > > I believe I now have vtkpython.exe. However, my 'import vtk' statement > > in my python code is not working. The error says something like "no > > module named vtk". > > Where do I find modules for vtk inpyqt? Do they exist? > > There are no VTK modules inPyQtitself. ThePyQtsupport is in the vtk package > which can be built with VTK itself. You will need to install VTK and the vtk > package correctly in order to achieve this. vtkpython.exe is not going to help > you. Ignore it. After you have built VTK, you need to do an extra step to > install the vtk package to where your Python interpreter will be able to find > it. > > Let's say that your build directory is c:\vtkbuild. > > cd \vtkbuild\Wrapping\Python > python setup.py install > cd \ > > Now you should be able to import vtk from your normal Python interpreter. If > you > are still having problems, you will need to copy-and-paste exactly what you > did > and what error messages you got. Do not paraphrase error messages. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it > had > an underlying truth." > -- Umberto Eco
Hi Robert, I realised that vtkpython.exe works, if I drag and drop my .py file on it. Ie, running my .py file using vtkpython.exe But my python interpreter does not work with the python file. I have tried what you suggested. Below is what I typed in command line, as well as the error that it produces. C:\Qt\VTKbin7\Wrapping\Python>python setup.py install Traceback (most recent call last): File "setup.py", line 138, in <module> raise "ERROR: Must specify BUILD_TYPE=<config-name> on command line." TypeError: exceptions must be classes or instances, not str Is it just a small error with input format or something? Thanks so much! Helvin -- http://mail.python.org/mailman/listinfo/python-list