ENV:
Ubuntu14.04
GCC 4.8.2
Python 2.7.6
下载wxWidget和wxPython的tar包:
wxWidgets-3.0.2.tar.bz2
wxPython-src-3.0.2.0.tar.bz2
解压:
tar xvjf wxWidgets-3.0.2.tar.bz2;cd wxWidgets; ./configure --with-gtk;make;sudo make install
- Go in to the directory where you want the library to be installed:
cd /usr/lib
- Create a symbolic link to the library:
sudo ln -s /usr/local/lib/libwx_gtk2u_core-3.0.so.0.2.0
tar xvjf wxPython-src-3.0.2.0.tar.bz2;cd wxPython-src-3.0.2.0; ./configure;make;sudo make install;cd wxPython;python setup.py build;sudo python setup.py install
(Note: if there is a "error: command 'x86_64-linux-gnu-gcc' failed with exit status 1", ignore it)
验证:
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.version()
'3.0.2.0 gtk2 (classic)'
That's OK.