wxPython的安装

安装了一下wxPython,比较麻烦,记在这里方便以后使用:)

1。安装wxWiget包:

      解压后在其目录下建立bld文件夹,然后运行configure:

mkdir  bld
cd  bld
../ configure --prefix =/ opt / wx / 2.8  
             --with-gtk 

             --with-gnomeprint 

             --with-opengl 

             --enable-
debug  
             --enable-geometry 

             --enable-graphics_ctx 

             --enable-sound --with-sdl 

             --enable-mediactrl 

             --enable-display 

             --disable-debugreport 

             --enable-unicode 

             --with-libjpeg
= builtin 
             --with-libpng
= builtin 
             --with-libtiff
= builtin 
             --with-zlib
= builtin 

2。编译安装:

制作一个脚本,内容如下:

make $ *  
    
&&  make  - C contrib / src / gizmos $ *  
    
&&  make  - C contrib / src / stc $ *

命名为 .make , 放到bld目录下

然后运行:

.make
.make install

 

3。安装wxPython:

解压,然后在它的wxPython目录里运行:

python setup . py build_ext --inplace -- debug  WX_CONFIG =/ opt / wx / 2.8 / bin / wx-config

WX_CONFIG=/opt/wx/2.8/bin/wx-config 中的路径为configure时设置的路径

4。设置环境变量:

export LD_LIBRARY_PATH =/ opt / wx / 2.8 / lib
export PYTHONPATH
=/ usr / local / wxPython - 2.8 . 3.0 / wxPython

我将wxPython的源码文件夹copy到了/usr/local/ 下,所以第二项是这样

最后将以上两项添加道home目录下的.bashrc中,以后用起来方便点:)

测试一下,运行wxPython目录下的demo:

python demo.py

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值