Linux & wxPython 2.9.3.1

Showing 1-9 of 9 messages
Linux & wxPython 2.9.3.1 blissend 5/29/12 12:47 PM
Hi,

I'm having a lot of trouble getting wxPython 2.9.3.1 to build on Linux without error. My goal is to make a Linux version of my program with something like pyinstaller but unfortunately for me it needs wxPython 2.9 instead of 2.8. So my question is, what's the easiest way to go about this? Is there a preferred Linux distro, get latest from something like svn instead, troubleshoot the build errors, or just forget about my preconception with the coolness 2.9 brings and stick to rewriting for 2.8 since it's ready to go on Linux? Perhaps I'm missing something here but I just can't seem to make any headway here.

I'm currently using a virtualbox ubuntu setup (was using fedora before having problems there too) and I now run into this error...

 
 The installation of wxWidgets is finished.  On certain
 platforms (e.g. Linux) you'll now have to run ldconfig
 if you installed a shared library and also modify the
 LD_LIBRARY_PATH (or equivalent) environment variable.
 
 wxWidgets comes with no guarantees and doesn't claim
 to be suitable for any purpose.
 
 Read the wxWindows Licence on licencing conditions.
 
 ------------------------------------------------------
 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DESTDIR:
PREFIX: /usr/local
wxlocation: /usr/local
wxcfg: /usr/local/bin/wx-config
wxcfgsrc: /usr/local/lib/wx/config/gtk2-unicode-2.9
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** /usr/bin/python2.7 -u ./setup.py build UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local"
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build
running build_py
running build
running build_py
copying wx/__version__.py -> build/lib.linux-i686-2.7/wx
copying wx/build/build_options.py -> build/lib.linux-i686-2.7/wx/build
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
building '_core_' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.7 -c src/helpers.cpp -o build/temp.linux-i686-2.7/src/helpers.o -pthread -O3 -pthread
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
src/helpers.cpp:15:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
ERROR: failed building wxPython.

FYI Thanks to everyone that's helped me in the past!

Thanks,
Adam
Re: [wxPython-users] Linux & wxPython 2.9.3.1 Chris Barker 5/29/12 1:45 PM
Hi,


On Tue, May 29, 2012 at 12:47 PM, blissend <blis...@gmail.com> wrote:
> src/helpers.cpp:15:20: fatal error: Python.h: No such file or directory
> compilation terminated.

This is pretty basic -- you either don't have the Python headers installed:

Do you have the "*-devel" or whatever they are called packages for
python installed?

Or they are installed, but the wx build can't find them.

-Chris




--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov
Re: [wxPython-users] Linux & wxPython 2.9.3.1 blissend 5/29/12 2:40 PM
Oh you! Taking my overly complicated explanation of the problem and basically telling me hey you forgot to plug in the power cord!

Anyway, thanks a million! It worked wonderful after installing the python-dev* stuff.
Re: [wxPython-users] Linux & wxPython 2.9.3.1 Sanjit 7/24/12 3:26 AM

I am trying with latest release wxPython 2.9.4.0 and  getting error as follows.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DESTDIR:
PREFIX: /usr/local
wxlocation: /usr/local
wxcfg: /usr/local/bin/wx-config
wxcfgsrc: /usr/local/lib/wx/config/gtk2-unicode-2.9
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
**** /usr/bin/python -u ./setup.py build UNICODE=1 BUILD_BASE=build WX_CONFIG="/usr/local/bin/wx-config --prefix=/usr/local"
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build
running build_py
running build
running build_py
copying wx/__version__.py -> build/lib.linux-i686-2.6/wx
copying wx/build/build_options.py -> build/lib.linux-i686-2.6/wx/build

package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
building '_core_' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -Iinclude -Isrc -I/usr/local/lib/wx/include/gtk2-unicode-2.9 -I/usr/local/include/wx-2.9 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/python2.6 -c src/helpers.cpp -o build/temp.linux-i686-2.6/src/helpers.o -pthread -O3
src/helpers.cpp:32:36: error: wx/gtk/private/win_gtk.h: No such file or directory
src/helpers.cpp: In member function ‘void wxPyApp::_BootstrapApp()’:
src/helpers.cpp:553: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:562: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In function ‘PyObject* __wxPySetDictionary(PyObject*, PyObject*)’:
src/helpers.cpp:785: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:790: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In function ‘void wxPyOORClientData_dtor(wxPyOORClientData*)’:
src/helpers.cpp:941: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In static member function ‘static wxPyCBInputStream* wxPyCBInputStream::create(PyObject*, bool)’:
src/helpers.cpp:1417: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:1418: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:1419: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In static member function ‘static wxPyCBOutputStream* wxPyCBOutputStream::create(PyObject*, bool)’:
src/helpers.cpp:1610: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:1611: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:1612: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In member function ‘void wxPyCallback::EventThunker(wxEvent&)’:
src/helpers.cpp:1816: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp:1816: warning: deprecated conversion from string constant to ‘char*’
src/helpers.cpp: In destructor ‘wxPyEvtSelfRef::~wxPyEvtSelfRef()’:
src/helpers.cpp:2078: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In member function ‘void wxPyEvtSelfRef::SetSelf(PyObject*, bool)’:
src/helpers.cpp:2085: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In function ‘wxString* wxString_in_helper(PyObject*)’:
src/helpers.cpp:2189: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In function ‘wxString Py2wxString(PyObject*)’:
src/helpers.cpp:2273: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In function ‘wxPoint* wxPoint_LIST_helper(PyObject*, int*)’:
src/helpers.cpp:2596: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp:2605: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In function ‘wxPoint2D* wxPoint2D_LIST_helper(PyObject*, size_t*)’:
src/helpers.cpp:2679: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp:2688: warning: suggest explicit braces to avoid ambiguous ‘else’
src/helpers.cpp: In function ‘bool wxColour_helper(PyObject*, wxColour**)’:
src/helpers.cpp:3063: warning: comparison between signed and unsigned integer expressions

error: command 'gcc' failed with exit status 1
ERROR: failed building wxPython.

Can anybody help me to install wxPython on CentOS6.
Re: [wxPython-users] Linux & wxPython 2.9.4.0 Robin Dunn 7/24/12 10:12 AM
> Can anybody help me to install wxPython on CentOS6.

Hmmm... It looks like wx/gtk/private/win_gtk.h was removed from the list
of files to be installed, although it is still there in the source tree.

A quick workaround for you would be to manually copy that file into the
appropriate destination folder, and also wx/gtk/dc.h which is also
missing, and then run build-wxpython.py again.

I'll look into doing a permanent fix and perhaps a .1 release...


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



Re: [wxPython-users] Linux & wxPython 2.9.4.0 Robin Dunn 7/24/12 11:45 AM
On 7/24/12 10:12 AM, Robin Dunn wrote:
> On 7/24/12 3:26 AM, Sanjit wrote:
>> src/helpers.cpp:32:36: error: wx/gtk/private/win_gtk.h: No such file or
>> directory
>
>>
>> Can anybody help me to install wxPython on CentOS6.
>
> Hmmm... It looks like wx/gtk/private/win_gtk.h was removed from the list
> of files to be installed, although it is still there in the source tree.
>
> A quick workaround for you would be to manually copy that file into the
> appropriate destination folder, and also wx/gtk/dc.h which is also
> missing, and then run build-wxpython.py again.
>
> I'll look into doing a permanent fix and perhaps a .1 release...
>

I've uploaded a new patch file that will fix this problem to
SourceForge.  You can get it here:

http://sourceforge.net/projects/wxpython/files/wxPython/2.9.4.0/wxPython-src-2.9.4.1.patch/download

Since this affects only source builds using wxGTK I'm not going to make
new binaries for OSX or Windows, or do a full release.
Re: [wxPython-users] Linux & wxPython 2.9.4.0 Daniel Herrera 10/13/12 2:13 PM
Hi Robin,

I have read this post and thanks to your patch I could install wxPython 2.9.4.1. However I don't know where wxPython is installed (wx-2.9.4-gtk2 in my python 2.7 site-packages only have wx folder). Therefore I still having this 'wxPython.wx' not found error.

I just checked 'installed_files.txt' and there is no clue about wxPython folder with reference to _wx.py (as I have in my Win7/Python2.7/wx-2.8). By the way I'm working to make wxPython work on red hat el5 with Python 2.7.

Any insight is greatly appreciated.

Thanks!
Daniel.
Re: [wxPython-users] Linux & wxPython 2.9.4.0 Robin Dunn 10/16/12 4:29 PM
On 10/13/12 2:13 PM, Daniel Herrera wrote:
> Hi Robin,
>
> I have read this post and thanks to your patch I could install wxPython
> 2.9.4.1. However I don't know where wxPython is installed (wx-2.9.4-gtk2
> in my python 2.7 site-packages only have wx folder). Therefore I still
> having this 'wxPython.wx' not found error.
>

The "wxPython" package was dropped in 2.7 and replaced with some
compatibility modules, (which were pretty much not working by the later
2.8 releases.)  In 2.9 it was dropped entirely and there is now only the
"wx" package.  What do you get if you run "import wx" ?
Re: [wxPython-users] Linux & wxPython 2.9.4.0 Daniel Herrera 10/17/12 5:51 AM
Hi Robin,

I have already installed the stable version 2.8.12.1 and I can work with wxPython, however I'm facing issues with Boa constructor. I will try to come back in 2.9.4.1 later and I will post here the result of changing from wxPython.wx import * to import wx (actually my code includes both lines). Thank you Robin!

Daniel.