[vtkusers] vtk latest + vanilla python 2.2.2

David Gobbi dgobbi at imaging.robarts.ca
Thu Feb 13 09:33:10 EST 2003


Hi Mike,

Are you using the cygwin shell?  It looks like you are trying
to use VTK with the copy of python that comes with cygwin.
That is the only thing I can think of that would give
os.name == 'posix' on a Windows system.

You should try running your VTK programs with the
C:/Python22/python.exe executable instead.

Cheers,
 - David

-- 
  David Gobbi, MSc                dgobbi at imaging.robarts.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Thu, 13 Feb 2003, Prabhu Ramachandran wrote:

> >>>>> "MC" == Mike Carifio <carifio at usys.com> writes:
>
>     MC> Here's the error I'm getting:
>
>     >>>> import vtk
> [snip]
>     >>>>
>
>     MC> Obviously, python 2.2.2 can't find libvtkCommonPython. There
>     MC> is a vtkCommonPython.dll. When I import that, I get:
>
>     >>>> import vtkCommonPython
>     MC> Fatal Python error: Interpreter not initialized (version
>     MC> mismatch?)
>
>     MC> Am I supposed to be running a particular version of Python? Do
>     MC> I need to build Python from sources to make everything kosher?
>
>     MC> Finally, is this email list archived? I can't believe I'm the
>     MC> first person to be having this problem. Thanks.
>
> Well, several things.  We try to keep VTK-Python as up-to-date as
> possible.  I test it under Linux and usually ask for feedback on Win32
> since I dont run Windows.  So far we have not had this problem.
>
> Yes, this list is archived.
>
>   http://public.kitware.com/pipermail/vtkusers/
>
> Yes, you are the first person to run into this and yes this is a wierd
> bug.  What is happening is that your os.name is 'posix' even though
> the OS you are running is win32!?  Therefore when you import vtk it
> tries to import the libvtk*Python modules instead of vtkPython*.
> Could you please tell us the output of this:
>
>  python -c "import os; print os.name"
>
> If that prints 'posix' we need another way to determine your os.
> AFAIK Win32 should print either 'dos' or 'nt' and not posix.  Unless
> of course, you have installed python via cygwin.  This could also
> explain your version mismatch error.  If this is the case then you
> should not use the DLL's that you build from VS7.  Instead you need to
> build VTK from within cygwin.
>
> If OTOH, you have installed Python for win32 you simply need to make
> sure that you are using the same version of the Python interpreter
> that you built your python wrappers with.  So if you have multiple
> versions of Python installed on your system you need to make sure that
> you build VTK-Python with the Python headers corresponding to the
> Python interpreter that you plan to use to run vtk-python scripts.
> You dont have to build Python from source to get everything working.
>
> cheers,
> prabhu
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list