ubuntu 10.04 安装wxpython和ulipad

    技术2024-08-07  61

     

    python的IDE,很多人都说ulipad很轻便。果然。

    按照readme.txt所说的运行。

    出现错误:

    root@ubuntu:/home/zhangbin/Documents/ulipad# python UliPad.pyw

    Traceback (most recent call last):

      File "UliPad.pyw", line 25, in <module>

        import UliPad

      File "/home/zhangbin/Documents/ulipad/UliPad.py", line 30, in <module>

        import wx

    ImportError: No module named wx

    root@ubuntu:/home/zhangbin/Documents/ulipad# python UliPad.py

    Traceback (most recent call last):

      File "UliPad.py", line 30, in <module>

        import wx

    ImportError: No module named wx

    应该是没有安装wxPython库。

    ============================================================

    安装过程,参看

    http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

    我的windows xp上是2.8.11的wxpython,附带2.7的python。

    linux上也是。

    安装过程如下:

     

     

    1.import the key into your apt's list of trusted keys root@ubuntu:/home/zhangbin/Documents#  curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                  Dload  Upload   Total   Spent    Left  Speed 104  1678  104  1678    0     0   1090      0  0:00:01  0:00:01 --:--:--  4122 OK

     

     

    root@ubuntu:/home/zhangbin/Documents# curl http://apt.wxwidgets.org/key.asc | sudo apt-key add -

    The program 'curl' is currently not installed.  You can install it by typing:

    apt-get install curl

    gpg: no valid OpenPGP data found.

    root@ubuntu:/home/zhangbin/Documents# apt-get install curl

    Reading package lists... Done

    Building dependency tree       

    Reading state information... Done

    The following NEW packages will be installed:

      curl

    0 upgraded, 1 newly installed, 0 to remove and 98 not upgraded.

    Need to get 208kB of archives.

    After this operation, 328kB of additional disk space will be used.

    Get:1 http://Ubuntu.srt.cn/ubuntu/ lucid/main curl 7.19.7-1ubuntu1 [208kB]

    Fetched 208kB in 4s (45.1kB/s)

    Selecting previously deselected package curl.

    (Reading database ... 139202 files and directories currently installed.)

    Unpacking curl (from .../curl_7.19.7-1ubuntu1_i386.deb) ...

    Processing triggers for man-db ...

    Setting up curl (7.19.7-1ubuntu1) ...

    root@ubuntu:/home/zhangbin/Documents# 

    2. /etc/apt/sources.list  Replace the "DIST" text with whatever is appropriate for your system. # wxWidgets/wxPython repository at apt.wxwidgets.org deb http://apt.wxwidgets.org/ DIST-wx main deb-src http://apt.wxwidgets.org/ DIST-wx main 我使用lucid-wx 49 deb http://apt.wxwidgets.org/ lucid-wx main 50 deb-src http://apt.wxwidgets.org/ lucid-wx main 3.Run the this command to update your local copy of the package meta-data. sudo apt-get update 4 You can now use your favorite package selection tool to install or upgrade the wxWidgets and wxPython packages. Here's how to do it with apt-get:

     

    sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n

    The packages libwxgtk2.8-dev and libgtk2.0-dev may need to be installed if a 3rd party application requires wxWidgets when building from source.

    sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev These packages (and their dependencies) will replace earlier versions of wxPython and wxGTK in the same ReleaseSeries that may have been installed previously.  There are a few other wx packages as well, but those listed above and their dependencie s are the core that are needed for use with wxPython. root@ubuntu:/home/zhangbin/Documents# sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libwxbase2.8-0 libwxgtk2.8-0 python-wxversion Suggested packages: libgnomeprintui2.2-0 wx2.8-doc wx2.8-examples python-xml The following NEW packages will be installed: libwxbase2.8-0 libwxgtk2.8-0 python-wxgtk2.8 python-wxtools python-wxversion wx2.8-i18n 0 upgraded, 6 newly installed, 0 to remove and 100 not upgraded. Need to get 12.1MB of archives. After this operation, 41.7MB of additional disk space will be used. Do you want to continue [Y/n]? y WARNING: The following packages cannot be authenticated!   libwxbase2.8-0 libwxgtk2.8-0 python-wxversion python-wxgtk2.8 python-wxtools   wx2.8-i18n Install these packages without verification [y/N]? y Get:1 http://apt.wxwidgets.org/ lucid-wx/main libwxbase2.8-0 2.8.11.0-0 [626kB] Get:2 http://apt.wxwidgets.org/ lucid-wx/main libwxgtk2.8-0 2.8.11.0-0 [3,456kB] Get:3 http://apt.wxwidgets.org/ lucid-wx/main python-wxversion 2.8.11.0-0 [25.9kB] Get:4 http://apt.wxwidgets.org/ lucid-wx/main python-wxgtk2.8 2.8.11.0-0 [7,195kB] Get:5 http://apt.wxwidgets.org/ lucid-wx/main python-wxtools 2.8.11.0-0 [56.3kB] Get:6 http://apt.wxwidgets.org/ lucid-wx/main wx2.8-i18n 2.8.11.0-0 [787kB]     Fetched 12.1MB in 10min 30s (19.3kB/s)                                          Selecting previously deselected package libwxbase2.8-0. (Reading database ... 139219 files and directories currently installed.) Unpacking libwxbase2.8-0 (from .../libwxbase2.8-0_2.8.11.0-0_i386.deb) ... Selecting previously deselected package libwxgtk2.8-0. Unpacking libwxgtk2.8-0 (from .../libwxgtk2.8-0_2.8.11.0-0_i386.deb) ... Selecting previously deselected package python-wxversion. Unpacking python-wxversion (from .../python-wxversion_2.8.11.0-0_all.deb) ... Selecting previously deselected package python-wxgtk2.8. Unpacking python-wxgtk2.8 (from .../python-wxgtk2.8_2.8.11.0-0_i386.deb) ... Selecting previously deselected package python-wxtools. Unpacking python-wxtools (from .../python-wxtools_2.8.11.0-0_all.deb) ... Selecting previously deselected package wx2.8-i18n. Unpacking wx2.8-i18n (from .../wx2.8-i18n_2.8.11.0-0_all.deb) ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for python-gmenu ... Rebuilding /usr/share/applications/desktop.en_US.utf8.cache... Processing triggers for python-support ... Setting up libwxbase2.8-0 (2.8.11.0-0) ... Setting up libwxgtk2.8-0 (2.8.11.0-0) ... Setting up python-wxversion (2.8.11.0-0) ... Setting up wx2.8-i18n (2.8.11.0-0) ... Processing triggers for python-central ... Setting up python-wxgtk2.8 (2.8.11.0-0) ... update-alternatives: using /usr/lib/wx/python2.6/wx2.8.pth to provide /usr/lib/python2.6/dist-packages/wx.pth (wx2.6.pth) in auto mode. Processing triggers for python-central ... Setting up python-wxtools (2.8.11.0-0) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place root@ubuntu:/home/zhangbin/Documents# sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev Reading package lists... Done Building dependency tree        Reading state information... Done python-wxgtk2.8 is already the newest version. python-wxtools is already the newest version. wx2.8-i18n is already the newest version. The following extra packages will be installed:   cvs debhelper gettext html2text intltool-debian libatk1.0-dev libcairo2-dev   libexpat1-dev libfontconfig1-dev libmail-sendmail-perl libpango1.0-dev   libpixman-1-dev libsys-hostname-long-perl libwxbase2.8-dev   libxcb-render-util0-dev libxcb-render0-dev libxcomposite-dev libxcursor-dev   libxdamage-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev   libxrandr-dev libxrender-dev po-debconf wx2.8-headers x11proto-composite-dev   x11proto-damage-dev x11proto-fixes-dev x11proto-randr-dev   x11proto-render-dev x11proto-xinerama-dev Suggested packages:   dh-make gettext-doc libcairo2-doc libgtk2.0-doc libpango1.0-doc wx2.8-doc   wx-common libmail-box-perl The following NEW packages will be installed:   cvs debhelper gettext html2text intltool-debian libatk1.0-dev libcairo2-dev   libexpat1-dev libfontconfig1-dev libgtk2.0-dev libmail-sendmail-perl   libpango1.0-dev libpixman-1-dev libsys-hostname-long-perl libwxbase2.8-dev   libwxgtk2.8-dev libxcb-render-util0-dev libxcb-render0-dev libxcomposite-dev   libxcursor-dev libxdamage-dev libxfixes-dev libxft-dev libxi-dev   libxinerama-dev libxrandr-dev libxrender-dev po-debconf wx2.8-headers   x11proto-composite-dev x11proto-damage-dev x11proto-fixes-dev   x11proto-randr-dev x11proto-render-dev x11proto-xinerama-dev 0 upgraded, 35 newly installed, 0 to remove and 100 not upgraded. Need to get 12.5MB of archives. After this operation, 47.4MB of additional disk space will be used. Do you want to continue [Y/n]?  WARNING: The following packages cannot be authenticated!   wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev Install these packages without verification [y/N]?  root@ubuntu:/home/zhangbin/Documents# cd ulipad root@ubuntu:/home/zhangbin/Documents/ulipad# ls acp            doc        modules     setup_inno.py        UliPad.pyw AUTHORS.txt    error.txt  packages    tools                wizard ChangeLog.txt  images     plugins     UliPad.exe.manifest conf           INFO.txt   README.txt  ulipad.ico contrib        lang       resources   UliPad.py COPYLEFT.txt   mixins     scripts     UliPad.pyc root@ubuntu:/home/zhangbin/Documents/ulipad# ./UliPad.pyw begin... 05:45:15 end... 05:45:17

     

     

     

    还是有对齐的问题,真是纠结啊。要是真按照前辈们说的,要两周才能摸索出来,人生能有几个两周啊!

     

     

    语法检查的结果是:

    需要两个空格线

    ,后面要有空白。

    最新回复(0)