[vtkusers] vtk 4.0, RH 7.2, Python 2.2.1 install problems
David Gobbi
dgobbi at imaging.robarts.ca
Fri Aug 16 09:52:43 EDT 2002
Hi Phil,
You also need to set the PYTHONPATH to the location of
libvtkCommonPython.so et al. The PYTHONPATH should include
both this path and VTK/Wrapping/Python.
- David
--
David Gobbi, MSc dgobbi at imaging.robarts.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
On Thu, 15 Aug 2002, Phil wrote:
> Hi,
>
> [Please forgive yet another newbie question.]
>
> Despite being on a completely different OS (Red Hat 7.2 Linux) I'm having
> a very similar problem to Jason
>
> http://public.kitware.com/pipermail/vtkusers/2002-August/012775.html
>
> RH 7.2 comes with Python 1.5, but I've installed Python 2.2.1 in another
> location, intending to use the new Python with vtk and other packages.
>
> I built vtk 4.0 using the new Python distribution for the answers to the
> 2 questions about where to find Python.h and the library. The build and install
> seemed to have gone without any errors AFAICT. I also answered affirmatively
> to the build Hybrid question, as I'd like to try out MayaVi, whose instructions
> indicate a need for that build option.
>
> I was getting some ImportErrors at my first attempt to use vtk through
> Python and figured the cure was to copy the whole contents of
>
> VTK/Wrapping/Python/
>
> into python's area
>
> /usr/netpub/python-2.2.1/lib/python2.2/
>
> (although I'm not familiar enough to know how to compile
> them into the ".pyc" and ".pyo" files that I see from other
> packages.)
>
> Also, I've set my LD_LIBRARY_PATH environment variable to include
> the directory containing the dynamically loaded libraries for vtk,
> such as libvtkCommonPython.so
>
> Nevertheless, trying to run the sample script in
>
> VTK/Examples/Tutorial/Step1/Python/Cone.py
>
> I get:
>
> $ Cone.py
> Adding parser accelerators ...
> Done.
> Traceback (most recent call last):
> File "./Cone.py", line 9, in ?
> from vtkpython import *
> File "/usr/netpub/python-2.2.1/lib/python2.2/vtkpython.py", line 29, in ?
> exec "from "+kit_name+" import *"
> File "<string>", line 1, in ?
> ImportError: No module named libvtkCommonPython
> [4381 refs]
>
>
> What am I missing?
>
> Thanks.
>
More information about the vtkusers
mailing list