Ubuntu and wxpython, cannot install

431 views
Skip to first unread message

Antonio Goméz Soto

unread,
Mar 17, 2012, 5:02:10 AM3/17/12
to wx-u...@googlegroups.com
Hello,

I want to port my application to Ubuntu. I am not an experienced Ubuntu user,
though I do have some redhat experience.

I just downloaded and installed Ubuntu 11.10.
According to http://wiki.wxpython.org/InstallingOnUbuntuOrDebian
there are no wxpython packages for that version.

Do I need to compile from source now? I would rather like to build a .deb
in that case. Will my users need to do that too before installation?

Thanks for any advice.
Antonio


evstevemd

unread,
Mar 17, 2012, 10:59:39 AM3/17/12
to wx-users
Hi,

On Mar 17, 12:02 pm, Antonio Goméz Soto <antonio.gomez.s...@gmail.com>
wrote:
> Hello,
>
> I want to port my application to Ubuntu. I am not an experienced Ubuntu user,
> though I do have some redhat experience.
>
> I just downloaded and installed Ubuntu 11.10.
> According tohttp://wiki.wxpython.org/InstallingOnUbuntuOrDebian
> there are no wxpython packages for that version.
>
> Do I need to compile from source now? I would rather like to build a .deb
> in that case. Will my users need to do that too before installation?
>
> Thanks for any advice.
> Antonio

There is wxPython that comes with Ubuntu.
The best beginners way would be install app that uses wxPython.
But using synaptic (Yes it is still my best app than USC) search
wxPython should so it!

Antonio Goméz Soto

unread,
Mar 17, 2012, 12:06:49 PM3/17/12
to wx-u...@googlegroups.com, evstevemd
Op 17-03-12 15:59, evstevemd schreef:
> Hi,
>
> On Mar 17, 12:02 pm, Antonio Gom�z Soto <antonio.gomez.s...@gmail.com>

I am very sorry. I forgot to mention that I need 2.9.3 because of WebView.
After some googling I found out that 11.10 came out in october last year.
Does that mean it is too new for the wxPython own APT repository?
Should I install an older version like 11.04 and recommend that to my end users?
Will 11.04 contain the necessary WebKit version?

What if my users use an older Ubuntu, in that case should I create my
own APT repositiry where they can download the newer webkit package that is
required by 2.9.3? Or would that be too complicated?

Sorry, my users have long been waiting on browser features in our application,
so they are on my back now.

Thanks,
Antonio


Serge Stakhanov

unread,
Mar 17, 2012, 12:28:41 PM3/17/12
to wx-u...@googlegroups.com
Hello Antonio.

Ubuntu includes stable wxWidgets packages only.  2.9.3 is development release so I am afraid you have to build 2.9.3 release yourself.

2012/3/17 Antonio Goméz Soto <antonio.g...@gmail.com>
Op 17-03-12 15:59, evstevemd schreef:
> Hi,
>
> On Mar 17, 12:02 pm, Antonio Goméz Soto <antonio.gomez.s...@gmail.com>

Igor Korot

unread,
Mar 17, 2012, 12:35:31 PM3/17/12
to wx-u...@googlegroups.com
Hi,
Besides, you can make statically linked app.

Thank you.

Antonio Goméz Soto

unread,
Mar 17, 2012, 12:58:10 PM3/17/12
to wx-u...@googlegroups.com, Serge Stakhanov
Serge,

thank you. I am now trying to compile it myself. I installed a new Ubuntu,
but I keep bumping into dependencies. I solved a few of them, but gstreamer
puzzles me. Is there a list of things wxpython depends on?

The config.log says: no gstreamer-plugins-base installed, but I do have
that on my system.

Any pointers?

Thanks,
Antonio.

Op 17-03-12 17:28, Serge Stakhanov schreef:


> Hello Antonio.
>
> Ubuntu includes stable wxWidgets packages only. 2.9.3 is development release so I am afraid you have to build 2.9.3 release yourself.
>

> 2012/3/17 Antonio Gom�z Soto <antonio.g...@gmail.com <mailto:antonio.g...@gmail.com>>


>
> Op 17-03-12 15:59, evstevemd schreef:
> > Hi,
> >

> > On Mar 17, 12:02 pm, Antonio Gom�z Soto <antonio.gomez.s...@gmail.com <mailto:antonio.gomez.s...@gmail.com>>


> > wrote:
> >> Hello,
> >>
> >> I want to port my application to Ubuntu. I am not an experienced Ubuntu user,
> >> though I do have some redhat experience.
> >>
> >> I just downloaded and installed Ubuntu 11.10.

> >> According tohttp://wiki.wxpython.org/InstallingOnUbuntuOrDebian <http://wiki.wxpython.org/InstallingOnUbuntuOrDebian>


> >> there are no wxpython packages for that version.
> >>
> >> Do I need to compile from source now? I would rather like to build a .deb
> >> in that case. Will my users need to do that too before installation?
> >>
> >> Thanks for any advice.
> >> Antonio
> >
> > There is wxPython that comes with Ubuntu.
> > The best beginners way would be install app that uses wxPython.
> > But using synaptic (Yes it is still my best app than USC) search
> > wxPython should so it!
> >
>
> I am very sorry. I forgot to mention that I need 2.9.3 because of WebView.
> After some googling I found out that 11.10 came out in october last year.
> Does that mean it is too new for the wxPython own APT repository?
> Should I install an older version like 11.04 and recommend that to my end users?
> Will 11.04 contain the necessary WebKit version?
>
> What if my users use an older Ubuntu, in that case should I create my
> own APT repositiry where they can download the newer webkit package that is
> required by 2.9.3? Or would that be too complicated?
>
> Sorry, my users have long been waiting on browser features in our application,
> so they are on my back now.
>
> Thanks,
> Antonio
>
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>

> To unsubscribe, send email to wx-users+u...@googlegroups.com <mailto:wx-users%2Bunsu...@googlegroups.com>
> or visit http://groups.google.com/group/wx-users

Serge Stakhanov

unread,
Mar 17, 2012, 2:01:40 PM3/17/12
to wx-users
I installed gstreamer while tried to run movie on Totem Player,
actually totem requested and installed gstreamer itself.
But I have xubuntu 10.04 so I am not sure how totem will behave on
Ubuntu 11.10

On 17 мар, 20:58, Antonio Goméz Soto <antonio.gomez.s...@gmail.com>
wrote:
> Serge,
>
> thank you. I am now trying to compile it myself. I installed a new Ubuntu,
> but I keep bumping into dependencies. I solved a few of them, but gstreamer
> puzzles me. Is there a list of things wxpython depends on?
>
> The config.log says: no gstreamer-plugins-base installed, but I do have
> that on my system.
>
> Any pointers?
>
> Thanks,
> Antonio.
>
> Op 17-03-12 17:28, Serge Stakhanov schreef:
>
>
>
>
>
>
>
> > Hello Antonio.
>
> > Ubuntu includes stable wxWidgets packages only.  2.9.3 is development release so I am afraid you have to build 2.9.3 release yourself.
>
> > 2012/3/17 Antonio Gom z Soto <antonio.gomez.s...@gmail.com <mailto:antonio.gomez.s...@gmail.com>>
> >     Please readhttp://www.wxwidgets.org/support/mlhowto.htmbefore posting.
>
> >     To unsubscribe, send email to wx-users+u...@googlegroups.com <mailto:wx-users%2Bunsu...@googlegroups.com>
> >     or visithttp://groups.google.com/group/wx-users
>
> > --
> > Please readhttp://www.wxwidgets.org/support/mlhowto.htmbefore posting.

Robin Dunn

unread,
Mar 17, 2012, 2:37:42 PM3/17/12
to wx-u...@googlegroups.com
On 3/17/12 9:35 AM, Igor Korot wrote:
> Hi,
> Besides, you can make statically linked app.
>

Not with Python extension modules.


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

Robin Dunn

unread,
Mar 17, 2012, 2:37:45 PM3/17/12
to wx-u...@googlegroups.com
On 3/17/12 9:58 AM, Antonio Gom�z Soto wrote:
> Serge,
>
> thank you. I am now trying to compile it myself. I installed a new Ubuntu,
> but I keep bumping into dependencies. I solved a few of them, but gstreamer
> puzzles me. Is there a list of things wxpython depends on?

I think there was a list of requirements posted on the wxPython-users
list of what the poster needed to install for SuSE. It's probably a
similar list for Ubuntu, plus the libwebkitgtk-dev package.

>
> The config.log says: no gstreamer-plugins-base installed, but I do have
> that on my system.
>

Look for development packages for gconf or libgconf or something like
that. The gstreamer development packages seem to have some sort of an
implicit dependency on gconf devel as the gstreamer detection in our
configure fails if it's not installed.

Antonio Goméz Soto

unread,
Mar 17, 2012, 5:51:49 PM3/17/12
to wx-u...@googlegroups.com
Everybody thanks for the suggestions. I reinstalled Ubuntu, downloaded the sources, and did the following:

$ sudo apt-get install build-essential
$ sudo apt-get install libgtk2.0-dev
$ sudo apt-get install freeglut3-dev
$ sudo apt-get install libsdl1.2-dev
$ sudo apt-get install libgstreamer-plugins-base0.10-dev
$ sudo apt-get install python2.7-dev
$ wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.9.3.1.tar.bz2
$ tar xjvf wxPython-src-2.9.3.1.tar.bz2
$ cd wxPython-src-2.9.3.1/wxPython
$ ./build-wxpython.py --build_dir=../bld

This worked, I now have a compiled version. Does wxPython have a built-in
method to create a .deb package? Or is it already there somewhere?


Thanks,
Antonio


Op 17-03-12 19:37, Robin Dunn schreef:

Robin Dunn

unread,
Mar 20, 2012, 4:51:28 PM3/20/12
to wx-u...@googlegroups.com
On 3/17/12 2:51 PM, Antonio Gom�z Soto wrote:
> Everybody thanks for the suggestions. I reinstalled Ubuntu, downloaded the sources, and did the following:
>
> $ sudo apt-get install build-essential
> $ sudo apt-get install libgtk2.0-dev
> $ sudo apt-get install freeglut3-dev
> $ sudo apt-get install libsdl1.2-dev
> $ sudo apt-get install libgstreamer-plugins-base0.10-dev
> $ sudo apt-get install python2.7-dev
> $ wget http://downloads.sourceforge.net/wxpython/wxPython-src-2.9.3.1.tar.bz2
> $ tar xjvf wxPython-src-2.9.3.1.tar.bz2
> $ cd wxPython-src-2.9.3.1/wxPython
> $ ./build-wxpython.py --build_dir=../bld
>
> This worked, I now have a compiled version. Does wxPython have a built-in
> method to create a .deb package? Or is it already there somewhere?
>

There is the debian folder in the root of the wxWidgets source tree that
was used in 2.8 and 2.6 to build .deb packages for both wxWidgets and
wxPython, but it has not been maintained for 2.9 as somebody in the
Ubuntu project (IIRC) said they would take over creation of the packages.

Robin Dunn

unread,
Jul 13, 2012, 4:24:12 PM7/13/12
to wx-u...@googlegroups.com
On 7/13/12 11:50 AM, Swanzy wrote:
> So I followed these steps to install wxPython 2.9.3... Now that I have
> done all of this, whenever I try to use wx I get an error.
> " 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.3: cannot open shared object file:
> No such file or directory"
>
> Any ideas what I did wrong? Thanks.

If your wxWidgets was installed to a non-standard prefix then you need
to set LD_LIBRARY_PATH to include the lib dir in the prefix you used.
Message has been deleted

Swanzy

unread,
Jul 13, 2012, 7:28:32 PM7/13/12
to wx-u...@googlegroups.com
So I did that, but now it's just running like version 2.8 (no wx.webview or wx.html2), any ideas why?


Robin Dunn

unread,
Jul 13, 2012, 9:55:30 PM7/13/12
to wx-u...@googlegroups.com
On 7/13/12 1:51 PM, Swanzy wrote:
>
> Would it be safer to just reinstall it to a standard prefix? Or how do
> you go about setting the LD_LIBRARY_PATH to add another folder? Once
> again thanks.
>

You can set it in your .bashrc or .profile scripts which are run when a
new shell is started. You can also add it to /etc/ld.so.conf and then
run ldconfig as root to have it rescan the folders. Or you can set it
temporarily for just one command on the command line before running
python, like:

LD_LIBRARY_PATH=/myprefix/lib python someApp.py

Robin Dunn

unread,
Jul 13, 2012, 9:57:12 PM7/13/12
to wx-u...@googlegroups.com
On 7/13/12 4:28 PM, Swanzy wrote:
> So I did that, but now it's just running like version 2.8 (no wx.webview
> or wx.html2), any ideas why?

Probably because you are importing 2.8 instead. Look at the strings in
Python's sys.path to see the order that directories are searched when
importing, and see where the packages that you built are located with
respect to the system wxPython package. Also if you have more than one
python installed make sure you are using the same one that was used for
the build.

Swanzy

unread,
Jul 16, 2012, 12:29:53 PM7/16/12
to wx-u...@googlegroups.com
It finds the 2.9 version first, but do I have to remove the 2.8 one? (If so how do I do that, because I tried to do that with just a remove() function which didn't work)

Robin Dunn

unread,
Jul 16, 2012, 1:26:14 PM7/16/12
to wx-u...@googlegroups.com
On 7/16/12 9:29 AM, Swanzy wrote:
> It finds the 2.9 version first, but do I have to remove the 2.8 one?

No, they can coexist.

> (If
> so how do I do that, because I tried to do that with just a remove()
> function which didn't work)
>
> On Friday, July 13, 2012 7:57:12 PM UTC-6, Robin Dunn wrote:
>
> On 7/13/12 4:28 PM, Swanzy wrote:
> > So I did that, but now it's just running like version 2.8 (no
> wx.webview
> > or wx.html2), any ideas why?


Ok then the issue may be that the libraries that wx.html2 depends upon
(libwebkitgtk) does not have the -dev packages installed, or it is not a
new enough version, so that part of the build was skipped.

The wx.webview module comes from a different project (wxWebKit) and is
not installed as part of wxPython.

Swanzy

unread,
Jul 16, 2012, 1:53:00 PM7/16/12
to wx-u...@googlegroups.com
Oh wait... really? Could you send me a link to getting the wxWebKit then?

Robin Dunn

unread,
Jul 16, 2012, 3:22:03 PM7/16/12
to wx-u...@googlegroups.com
On 7/16/12 10:53 AM, Swanzy wrote:
> Oh wait... really? Could you send me a link to getting the wxWebKit then?
>

http://lmgtfy.com/?q=wxWebKit

Swanzy

unread,
Jul 16, 2012, 5:50:02 PM7/16/12
to wx-u...@googlegroups.com
Lol, I did that. But I read that wx added a module call wx.webview in 2.9.3 which is what I was trying to figure out. But if that's not true oh well, and thanks.

Robin Dunn

unread,
Jul 16, 2012, 6:06:07 PM7/16/12
to wx-u...@googlegroups.com
On 7/16/12 2:50 PM, Swanzy wrote:
> Lol, I did that. But I read that wx added a module call wx.webview in
> 2.9.3 which is what I was trying to figure out. But if that's not true
> oh well, and thanks.

In wxPython that is available in the wx.html2 module (since the other
project was already using the wx.webview name.)

So as I mentioned before it is probably a matter of not having new
enough libwebkitgtk or its -dev package installed. Take a closer look at
the output of the wxWidgets configure step, or at the config.log file to
see for sure why it wasn't able to build those classes.

Swanzy

unread,
Jul 18, 2012, 12:32:51 PM7/18/12
to wx-u...@googlegroups.com
Here is the new error message by the way.
"  File "webview", line 17, in <module>
    dialog = MyBrowser(None, -1)
  File "webview", line 10, in __init__
    self.browser = wx.html2.WebView.New(self)
  File "/usr/local/lib/python2.7/dist-packages/wx-2.9.3-gtk2/wx/html2.py", line 125, in New
    val = _html2.WebView_New(*args, **kwargs)
NotImplementedError: wx.html2 is not available on this platform."
Reply all
Reply to author
Forward
0 new messages