歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Debian(Wheezy)安裝wxPython進行GUI開發

Debian(Wheezy)安裝wxPython進行GUI開發

日期:2017/2/28 14:24:22   编辑:Linux教程

Debian(Wheezy)安裝wxPython進行GUI開發

因為官方的http://wiki.wxpython.org/InstallingOnUbuntuOrDebian 並沒有wheezy的

所以這裡我們直接去倉庫搜吧

root@debian:/# apt-cache search python-wxgtk
python-wxgtk2.8 - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
python-wxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding, debug version)

root@debian:/# apt-get install python
Display all 1846 possibilities? (y or n)
root@debian:/# apt-get install python-wxgtk2.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libgadu3
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
python-wxversion
Suggested packages:
wx2.8-doc wx2.8-examples editra
The following NEW packages will be installed:
python-wxgtk2.8 python-wxversion
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,671 kB of archives.
After this operation, 33.8 MB of additional disk space will be used.

現在寫個簡單的Hello world測試下吧

#!/usr/bin/env python
# coding=utf-8
import wx
app = wx.App(False)
frame = wx.Frame(None, wx.ID_ANY, "Hello World!")
frame.Show(True)
app.MainLoop()

運行下這個py文件. GUI的就OK了, enjoy ~

Ubuntu中安裝wxPython http://www.linuxidc.com/Linux/2012-11/73911.htm

Copyright © Linux教程網 All Rights Reserved