【发布时间】:2011-11-26 21:10:54
【问题描述】:
我正在尝试从 linux 下的源代码安装 wxPython。我遵循的步骤是:
- 从http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2下载wxPython
-
运行
./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 makewxPython,它似乎运行没有错误。make install
但是当我现在尝试在 python 控制台 (v2.7) 中执行 import wx 时,python 找不到该模块。
所以我的问题是:
- 我是否缺少一些依赖项,尽管 wxPython 似乎可以构建和安装没有任何错误?
- 我在安装过程中是否遗漏了什么?
- 如何让 python 识别新包?
感谢任何提示、链接、文章。
【问题讨论】:
-
你给了它一个自定义的安装目录,
~/Local- 它在你的 Pythonpath 上吗? -
@DanielRoseman 我将
~/Local添加到pythonpath 但import wx仍然失败。
标签: python build dependencies wxpython installation