wxPython 2.9 for Ubuntu 12.04

1,584 views
Skip to first unread message

Bruce Sherwood

unread,
Jul 25, 2012, 12:53:26 PM7/25/12
to wxpytho...@googlegroups.com
I see that there isn't a package for wxPython 2.9 for Ubuntu 12.04. If I were to attempt to build 2.9 from source, what version of wxwidgets is required? Is wxwidgets 2.8 sufficient (it's the one available on Ubuntu 12.04).

Robin Dunn

unread,
Jul 25, 2012, 2:47:19 PM7/25/12
to wxpytho...@googlegroups.com
On 7/25/12 9:53 AM, Bruce Sherwood wrote:
> I see that there isn't a package for wxPython 2.9 for Ubuntu 12.04.

And there probably won't be. I don't have time nor desire to maintain
the .deb packaging scripts, and the Debian/Ubuntu folks don't seem to
care about providing binaries for a release from the "development"
release series even though some would say it is better and more stable
than the last "stable" release.

> If I
> were to attempt to build 2.9 from source, what version of wxwidgets is
> required? Is wxwidgets 2.8 sufficient (it's the one available on Ubuntu
> 12.04).

No, you need to use a matching version of wxWidgets. You're in luck
though, as the wxWidgets code is also in the wxPython-src tarball, and
wxPython's build-wxpython.py script will also build wxWidgets for you.
Be sure to get and apply the 2.9.4.1 patch that I mentioned yesterday
though.


--
Robin Dunn
Software Craftsman
http://wxPython.org



Bruce Sherwood

unread,
Jul 25, 2012, 4:39:26 PM7/25/12
to wxpytho...@googlegroups.com
Many thanks for the detailed advice.

Bruce
> --
> To unsubscribe, send email to wxPython-user...@googlegroups.com
> or visit http://groups.google.com/group/wxPython-users?hl=en

Bruce Sherwood

unread,
Jul 25, 2012, 10:52:09 PM7/25/12
to wxpytho...@googlegroups.com
I built and installed wxPython 2.9 on Ubuntu 12.04, with the recent
patch, but when I import wx I get this error:

File "userpoll.py", line 2, in <module>
from wxpoll import *
File "/home/bruce/Documents/wxPython/wxpoll.py", line 2, in <module>
import wx
File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line
45, in <module>
from wx._core import *
File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in <module>
import _core_
ImportError: libwx_gtk2u_adv-2.9.so.4: cannot open shared object file:
No such file or directory

However, I find this file:

/usr/local/lib/libwx_gtk2u_adv-2.9.so.4

Any idea what I could be doing wrong?

Robin Dunn

unread,
Jul 26, 2012, 12:20:28 PM7/26/12
to wxpytho...@googlegroups.com
On 7/25/12 7:52 PM, Bruce Sherwood wrote:
> I built and installed wxPython 2.9 on Ubuntu 12.04, with the recent
> patch, but when I import wx I get this error:
>
> File "userpoll.py", line 2, in <module>
> from wxpoll import *
> File "/home/bruce/Documents/wxPython/wxpoll.py", line 2, in <module>
> import wx
> File "/usr/local/lib/python2.7/dist-packages/wx/__init__.py", line
> 45, in <module>
> from wx._core import *
> File "/usr/local/lib/python2.7/dist-packages/wx/_core.py", line 4, in <module>
> import _core_
> ImportError: libwx_gtk2u_adv-2.9.so.4: cannot open shared object file:
> No such file or directory
>
> However, I find this file:
>
> /usr/local/lib/libwx_gtk2u_adv-2.9.so.4
>
> Any idea what I could be doing wrong?
>

You need to tell the system to look for shared libs in that path. You
can do that by setting LD_LIBRARY_PATH or you can edit /etc/ld.so.conf
and then run ldconfig to update the system search paths.

Bruce Sherwood

unread,
Jul 26, 2012, 1:58:26 PM7/26/12
to wxpytho...@googlegroups.com
Thanks! Silly me, I thought that /usr/local/lib was on the library
search path by default. It all works now.

Bruce
Reply all
Reply to author
Forward
0 new messages