VTK install

Discussion in 'Python' started by Gib, Sep 15, 2009.

  1. Gib

    Gib Guest

    As part of the MayaVi install, I need to install VTK. Follwoing the
    Enthought instructions, I went here:
    http://cpbotha.net/2009/08/13/python-2-6-enabled-vtk-5-4-windows-binaries/
    and installed vtk-5.4. I modified the PATH and also created an
    environment variable PYTHONPATH as directed, setting it to be C:
    \Program Files\VTK\bin; C:\Program Files\VTK\lib\site-packages;
    According to Botha's instructions, I should now be able to do 'import
    vtk', but this doesn't work: no module named vtk.

    Since VTK appears to be installed, I'm guessing that either the path
    setting is wrong, or python is not using PYTHONPATH. How can I check
    that PYTHONPATH is being used?
    Gib, Sep 15, 2009
    #1
    1. Advertising

  2. On Sep 15, 6:29 am, Gib <> wrote:
    > As part of the MayaVi install, I need to install VTK.  


    ....

    > Since VTK appears to be installed, I'm guessing that either the path
    > setting is wrong, or python is not using PYTHONPATH.  How can I check
    > that PYTHONPATH is being used?


    The paths in PYTHONPATH should show un sys.path python variable. So
    just do from a
    python prompt "import sys; sys.path" and check if the VTK directories
    are listed.

    You colòud aslo tentatively append your path to sys.path and then try
    again import vtk
    to see if it is a path problem or something else ...

    Ciao
    ----
    FB
    Francesco Bochicchio, Sep 15, 2009
    #2
    1. Advertising

  3. Gib

    Gib Guest

    On Sep 16, 12:28 am, Francesco Bochicchio <> wrote:
    > On Sep 15, 6:29 am, Gib <> wrote:
    >
    > > As part of the MayaVi install, I need to install VTK.  

    >
    > ...
    >
    > > Since VTK appears to be installed, I'm guessing that either the path
    > > setting is wrong, or python is not using PYTHONPATH.  How can I check
    > > that PYTHONPATH is being used?

    >
    > The paths in PYTHONPATH should show un sys.path python variable. So
    > just do from a
    > python prompt "import sys; sys.path" and check if the VTK directories
    > are listed.
    >
    > You colòud aslo tentatively append your path to sys.path and then try
    > again import vtk
    > to see if it is a path problem or something else ...
    >
    > Ciao
    > ----
    > FB


    Interesting. sys.path includes this path:
    'C:\\Documents and Settings\\mbog002.EC\\ C:\\Program Files\\VTK\\lib\
    \site-packages'
    The first part is what I set the environment variable HOME to (as per
    Enthought instructions), the second part is the VTK path. Apparently
    the specified VTK path is being made relative to HOME - clearly
    inconsistent with the installation instructions.

    I solved the problem by editing PYTHONPATH in the registry.
    Definitely a trap for Windows users.
    Gib, Sep 15, 2009
    #3
  4. En Tue, 15 Sep 2009 19:35:23 -0300, Gib <> escribió:
    > On Sep 16, 12:28 am, Francesco Bochicchio <> wrote:
    >> On Sep 15, 6:29 am, Gib <> wrote:
    >>
    >> > Since VTK appears to be installed, I'm guessing that either the path
    >> > setting is wrong, or python is not using PYTHONPATH.  How can I check
    >> > that PYTHONPATH is being used?

    >>
    >> The paths in PYTHONPATH should show un sys.path python variable. So
    >> just do from a
    >> python prompt "import sys; sys.path" and check if the VTK directories
    >> are listed.

    >
    > Interesting. sys.path includes this path:
    > 'C:\\Documents and Settings\\mbog002.EC\\ C:\\Program Files\\VTK\\lib\
    > \site-packages'
    > The first part is what I set the environment variable HOME to (as per
    > Enthought instructions), the second part is the VTK path. Apparently
    > the specified VTK path is being made relative to HOME - clearly
    > inconsistent with the installation instructions.


    Your VTK path starts with a space, and that confuses the path
    manipulations.

    > I solved the problem by editing PYTHONPATH in the registry.
    > Definitely a trap for Windows users.


    If you set the VTK path to an absolute path, this should not happen.

    --
    Gabriel Genellina
    Gabriel Genellina, Sep 16, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Yi-Yu Chou

    python, vtk, C++

    Yi-Yu Chou, Sep 30, 2003, in forum: Python
    Replies:
    3
    Views:
    464
    Fernando Perez
    Oct 1, 2003
  2. Yi-Yu Chou
    Replies:
    1
    Views:
    509
    =?Big5?B?Sj9yZ2VuIENlZGVyYmVyZw==?=
    Dec 16, 2003
  3. Yi-Yu Chou

    Build vtk classes - HELP !!!

    Yi-Yu Chou, Jan 13, 2004, in forum: Python
    Replies:
    0
    Views:
    380
    Yi-Yu Chou
    Jan 13, 2004
  4. sunil

    problem installing VTK

    sunil, Feb 16, 2004, in forum: Python
    Replies:
    0
    Views:
    295
    sunil
    Feb 16, 2004
  5. Ron Kneusel
    Replies:
    1
    Views:
    634
    Charl P. Botha
    Jun 3, 2004
Loading...

Share This Page