[Leaplist] Python question ....
Mark W. Alexander
slash at dotnetslash.net
Wed Jan 17 19:11:13 EST 2007
On Tue, Jan 16, 2007 at 08:26:03PM -0600, William A. Mahaffey III wrote:
> Mark W. Alexander wrote:
> >
> >The real problem in the snippet above is that the vtk Python module can't
> >find the file libvtkCommonPythonD.so.5 in /usr/local/lib. You need to either
> >a) find the what put it there and tell it to go into /usr/lib, b) find the
> >setup.py options to say "look for libraries in /usr/local/lib, or c) tell
> >your libc to also look in /usr/local/lib by updating /etc/ld.so.conf and
> >running ldconfig.
> >
> >hth! mwa
> >
> >
>
> Unfortunately I didn't do *any* of the install steps you elucidated, out of
> lack of familiarity w/ python. The python here is the box-stock python
> 2.4.3-x86_64, straight of the FC6 DVD. The vtk was compiled up & installed
> using make install (perhaps an unwise choice :-) ....). I like your option b)
> above, I'll try some of these things tomorrow. Thanks.
I just pulled down the PyVTK to look at their setup.py and they do not provide
support for specifying where the vtk options are to your choices are:
a) rebuild vtk to go into /usr/lib probably with `./configure --prefix=/usr`
before doing make install.
b) add /usr/local/lib to /etc/ld.so.conf and run `sudo ldconfig`
Then run `python setup.py ....`
Another hint: Look into `checkinstall` -
http://asic-linux.com.mx/~izto/checkinstall/
I strongly advocate using your package manager, whatever distro you use, to
maintain consistency on your system. Using checkinstall is as simple as
adding a word to make install, like:
checkinstall make install
It then prompts you for packaging information. The result is the same as `make
install` except that it traps whatever make install does and wraps it up in a
RPM/DEB/SLACKWARE package. It makes it real easy to uninstall if something
doesn't go right. It even shows the command to run to uninstall it when it's
complete.
For the same reason, I recommend `python setup.py bdist_rpm` to produce an
installable rpm. This way everything you've done is managed by RPM so if
anything tries to step on files from another package you're not surprised. Plus
you can easily uninstall stuff that, well, just doesn't quite work out ;)
I don't think bdist_deb is fully implemented yet, but you could also do:
checkinstall python setup.py install
and still "trap" it as any package type that checkinstall supports.
mwa
--
Mark W. Alexander
slash at dotnetslash.net
The contents of this message authored by Mark W. Alexander are released under
the Creative Commons Attribution-NonCommercial license. Copyright of quoted
materials, if any, are retained by the original author(s).
http://creativecommons.org/licenses/by-nc/2.0/
More information about the Leaplist
mailing list