[vtkusers] import error in cone.py

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Aug 3 12:55:38 EDT 2004


>>>>> "SD" == soumen dey <sdcompengg at yahoo.com> writes:

    SD> Hi!!!!  I am trying to run the cone.py scripts as the first
    SD> step to start using python with vtk.  But when I run the
    SD> script it crashes saying that " No module named vtk". I doono
    SD> why this error comes.

That means Python is unable to see the files in Wrapping\Python.
Exactly why that happens is unclear to me.  What happens if you try
this on the Python interpreter (IDLE will do fine too):

>>> import sys
>>> print sys.path

You might also want to run "python setup.py install".
  
    SD> As stated in README i have added c:\vtkbin\bin\debug in PATH
    SD> and set the PYTHONPATH variable to
    SD> c:\vtkbin\bin\debug;c:\vtkbin\wrapping\python.
 
    SD> I later tried to import sys and os in python command prompt
    SD> ...which resulted in success for sys module but it couldnot
    SD> import os module.

Hmm, that seems to imply that your Python installation (not related to
VTK) is somehow broken.  If python is unable to import the os module
something is seriously wrong.  I'd recommend that you get that working
first and then get to debugging the 'import vtk' problem.  Also,
giving us the exact error messages you get would be useful.
 
cheers,
prabhu



More information about the vtkusers mailing list