在Linux下从源代码安装wxPython

2024-04-28 22:13:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在linux下从源代码安装wxPython。我遵循的步骤是:

  1. http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2下载wxPython
  2. 运行./configure --prefix=$HOME/Local
    在配置过程结束时,输出为:

    Configured wxWidgets 2.8.12 for `x86_64-unknown-linux-gnu'
    
      Which GUI toolkit should wxWidgets use?                 GTK+ 2
      Should wxWidgets be compiled into single library?       no
      Should wxWidgets be compiled in debug mode?             no
      Should wxWidgets be linked as a shared library?         yes
      Should wxWidgets be compiled in Unicode mode?           no
      What level of wxWidgets compatibility should be enabled?
                                           wxWidgets 2.4      no
                                           wxWidgets 2.6      yes
      Which libraries should wxWidgets use?
                                           jpeg               sys
                                           png                sys
                                           regex              sys
                                           tiff               builtin
                                           zlib               sys
                                           odbc               no
                                           expat              builtin
                                           libmspack          no
                                           sdl                no
    
  3. makewxPython,运行时似乎没有错误。

  4. make install

但是当我现在尝试在python控制台(v2.7)中执行import wx时,python找不到模块。

所以我的问题是:

  1. 虽然wxPython看起来构建和安装没有任何错误,但我是否缺少一些依赖项?
  2. 在安装过程中有没有遗漏什么?
  3. 如何使python知道新的包?

任何提示,链接,文章是赞赏。


Tags: noinwhichusemode过程linuxsys
2条回答

对于wxPython 2.8.x,这里有完整的源代码生成说明:

http://wxpython.org/BUILD-2.8.html

如果您希望使用2.9,则可以使用以下说明:http://wxpython.org/builddoc.php

如果遇到问题,请在此处加入wxPython用户邮件列表/Google组:http://wxpython.org/maillist.php

告诉他们你使用的wxPython和Python的哪个版本以及Linux,你几乎肯定会得到帮助。那里有很多Linux的人。

我正在用python 2.7在centos机器上安装WxPython 3.0。

即使禁用mediactrl,install也会搜索GSTreamer并给出错误信息 "configure: error: GStreamer not available"尽管GSTreamer在机器上可用。

以下是两个此类生成的详细信息:

我的想法是关闭mediactrl,所以我使用以下选项

python build-wxpython.py --extra_setup=disable-mediactrl  --build_dir=../bld

或者

python build-wxpython.py --extra_setup="--disable-mediactrl  --build_dir=../bld

但是,它仍然搜索GSTreamer并输出下面列出的错误消息。 我重新安装了GSTreamer 0.10并将其安装到了\usr\lib\GSTreamer 0.10中,但是,我收到了相同的错误消息

错误消息:

checking what is the type of the third argument of getsockname... socklen_t
checking what is the type of the fifth argument of getsockopt... socklen_t
checking for linux/joystick.h... yes
checking for python... /home/aptRoot/tools/python/64/Python-2.7/bin/python
checking for WEBKIT... configure: WARNING: webkitgtk not found.
configure: WARNING: WebKit not available, disabling wxWebView
checking for CAIRO... yes
checking for cairo_push_group... yes
checking for GST... configure: WARNING: GStreamer 0.10 not available, falling back to 0.8
checking for GST... configure: WARNING: GStreamer 0.8/0.10 not available.
configure: error: GStreamer not available
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build-wxpython.py", line 378, in <module>
    wxbuild.main(wxscript, build_options)
  File "/home/hemadris/iAPT/install/wxPython-src-3.0.0.0/build/tools/build-wxwidgets.py", line 364, in main
    "Error running configure")
  File "/home/hemadris/iAPT/install/wxPython-src-3.0.0.0/build/tools/build-wxwidgets.py", line 80, in exitIfError
    raise builder.BuildError(msg)
BuildError

相关问题 更多 >