[wxPython-users] How does wxPython find wxWidgets?
Chris Carlen
crobc at sbcglobal.net
Fri Nov 2 15:06:11 PDT 2007
Robin Dunn wrote:
> Chris Carlen wrote:
>> and ran ldconfig, but to no avail. I can't get wxPython under the
>> Python2.5 installation to automatically find the wxWidgets libs.
>>
>> How to make this work?
>
> Linux (and other work-alikes) have a standard path that is searched for
> dynamic libraries, and setting the LD_LIBRARY_PATH extends that path
> with the dir(s) you specify. So you have a few options to make this
> automatic:
>
> * Set LD_LIBRARY_PATH in one of your login/init scripts so it is always
> in your environment.
>
> * Add that path to /etc/ld.so.conf and then run ldconfig. This will add
> it to the default shared library path.
>
> * Rebuild wxWidgets with a --prefix of one of the standard paths, like
> /usr or /usr/local.
Thanks for the reply, Robin!
I rebuilt one with --prefix=/usr which puts the libs directly in
/usr/lib and of course works.
I rebuilt another with --prefix=/usr/lib/wxPython-2.8.6.0-gtk2-unicode
which is analagous to the path where wxWidgets locates when I built from
the RPM sources for ver. 2.8.4.0.
This of course doesn't work unless I do:
ldconfig -v /usr/lib/wxPython-2.8.6.0-gtk2-unicode/lib
Interestingly, I only had to run this command once, and didn't bother to
put this lib path into my /etc/ld.so.conf or the command in some config
file. I suppose the ldconfig caching mechanism is working some magic
here. So I am prepared for the possibility that it might randomly stop
working some day, in which case I will know what to do.
P.S. Really fun toolkit and your book is great. I'm mainly an embedded
microcontroller/DSP programmer in C and analog/digital circuit designer.
I never knew how to program in an OOP language like Python or to
create GUIs before. It is much more approachable and fun than I had
anticipated. That is mostly due to how easy Python is to learn, and the
great "wxPython in Action" text. I don't think I would have enjoyed
this much had I attempted to learn it in C++ or Java.
Good day!
--
_____________________
Christopher R. Carlen
crobc at bogus-remove-me.sbcglobal.net
SuSE 9.1 Linux 2.6.5
More information about the wxpython-users
mailing list