Python Forum

Full Version: installing wxPython
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm new to this Python stuff, but am determined to develop an application and am interested in using wxPython. I am running openSUSE 4.3. There is no wheel for my version. Can anyone give me any help in installing this package on my system?

predirt
Which version of python are you running?
phoenix version of wx is what you want to be running, which requires python 3.x
try:
pip install wxpython
(Feb-22-2018, 06:46 AM)Larz60+ Wrote: [ -> ]Which version of python are you running?
phoenix version of wx is what you want to be running, which requires python 3.x
try:
pip install wxpython

Thanks for your response!

I have both 2.7 and 3.4 installed on my system. I intend to use 3.4 for this application.
I ran pip as you showed only to discover that I don't have GTK+-3 installed. So after I figure out how to get it on my system without screwing up anything else, I should be able to run pip again I suppose.

I've used openSUSE for years, but only as a email/web browsing/write a letter/create a disk label in gimp sort of user and never installed anything that didn't come from their repositories. Until now! So I'm pretty careful.

predirt
I prefer Linux, but have been on windows for the past few years.
I started with mint, and then went to openSUSE, I liked mint, but
not the restrictions on non open packages (at least when I used it).
OpenSUSE will be my choice as soon as I move back. I've got a really nice
inter Core I7 laptop which will be my Linux box, but I have to spend an
entire day cleaning up and saving anything worthwhile.

Once you have wx installed, download the tar source file. In that distro, there's
a demo directory. If you change to that directory and run the demo:
python demo.py
there is a demo page for I believe every widget in the entire package (at least I haven't
found one that's not in there). There are three notebook tabs. One has an overview,
one has the demo itself, and the final one has the source code.

It is extremely helpful.
I'm at a stop!

In order to install wxPython, I need GTK3. It's not in the repositories, so I downloaded the tarball. The web site said I also needed a newer version of glib, pango, atk, gdk-pixbuf and gobject! Cry

So I downloaded all the newest versions of those dependancies after checking that they weren't available in the openSUSE repositories. And I learned ./configure ... make... and sudo make install! I feel like I learned something at least!

Problem is: when I installed glib, the new version went into /usr/local/<directories> and the old version is /usr/<directories>. When I run configure for gdk-pixbuf, I get the following:

Error:
checking for pkg-config... (cached) /usr/bin/pkg-config checking pkg-config is at least version 0.16... yes checking for GLIB - version >= 2.48.0... *** 'pkg-config --modversion glib-2.0' returned 2.54.3, but GLIB (2.48.2) *** was found! If pkg-config was correct, then it is best *** to remove the old version of GLib. You may also be able to fix the error *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing *** /etc/ld.so.conf. Make sure you have run ldconfig if that is *** required on your system. *** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH *** to point to the correct configuration files no configure: error: *** GLIB 2.48.0 or better is required. The latest version of *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.
I'm a little afraid to just copy all the files from the new tree over the old one. Seems to me that the configure file doesn't believe pkg-config, looks in /usr/lib64 before /usr/local/lib64 and quits when it finds the older version. I looked at the various arguments to configure but aren't sure which one I need. This also seems like something that should be addressed in the configure file, which is auto generated, so I haven't the foggiest idea where to report this situation!

HELP! Pray
I hope this might help: https://wxpython.org/blog/2017-08-17-bui...index.html
I'm going to read through and see if I can pick up on something.
Perhaps one of the Linux users can help here.
I'll be back!
I found more, I'm not sure if it will help, it may, so here's some links:
https://forums.opensuse.org/showthread.p...nsuse-13-1
This linux build repository is touted to change daily, so may possibly be useful: https://wxpython.org/Phoenix/snapshot-builds/linux/
some additional information on the wxpython site: https://wxpython.org/pages/downloads/
And the link that I posted last night appears to be pretty comprehensive.
I also places a request to the moderators for Linux help, so that may be coming.
For OpenSuse (I don't recall if you said what version you are running) there are two ways. The first is through Yast. Open Yast, select "Software Management". In the "Search" box, type in "wxgtk". This should present you with several options, one of them being "python-wxWidgets-devel", just check it then click "Accept". This may be the older Python 2 version though.

The other way would be to go here: https://software.opensuse.org/package/wxGTK3-3_2, click the down arrow (download) for you version of OpenSuse then install using zypper or Yast. This should be the package for Python 3.
(Feb-23-2018, 02:43 PM)sparkz_alot Wrote: [ -> ]For OpenSuse (I don't recall if you said what version you are running) there are two ways. The first is through Yast. Open Yast, select "Software Management". In the "Search" box, type in "wxgtk". This should present you with several options, one of them being "python-wxWidgets-devel", just check it then click "Accept". This may be the older Python 2 version though.

The other way would be to go here: https://software.opensuse.org/package/wxGTK3-3_2, click the down arrow (download) for you version of OpenSuse then install using zypper or Yast. This should be the package for Python 3.

Neither of these suggestions worked! zypper said the package is not there. I have way too much effort into wx, I'm going to clean up as best as I can and use Tkinter. Thank you for your response.
Did you check out the links that I provided?
I hate to see you give up and move to tkinter. tkinter works, but is old style, and the geometry will drive
you crazy. I used it for a couple of years, then switched to wx when phoenix was released, and so glad I did.
Pages: 1 2