我在 Mac OSX Lion 机器上,我已经下载了 wxPython-src-2.9.3.1.tar.bz2。然后我做了以下事情(注意:输出消息已被删除):
$ tar -xjf wxPython-src-2.9.3.1.tar.bz2
$ cd wxPython-src-2.9.3.1
$ mkdir bld
$ cd bld
$ source /path/to/myvirtualenv/bin/activate
(myvirtualenv)$ cross_compiling=yes
(myvirtualenv)$ export MACOSX_DEPLOYMENT_TARGET=10.6.7
(myvirtualenv)$ set arch_flags="-arch ppc64 "
(myvirtualenv)$ ../configure \
--with-mac --enable-monolithic --enable-threads --enable-unicode \
--enable-debug_flag --enable-debug \
--with-libpng --with-libjpeg --with-libtiff --enable-unicode \
--with-opengl --enable-graphics_ctx --with-odbc --enable-gui \
--with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --with-macosx-version-min=10.6 \
CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --prefix=/path/to/myvirtualenv/
$ (myvirtualenv)make
$ (myvirtualenv)make install
之后,我确实收到了这条消息(所以我猜它成功了):
...
------------------------------------------------------
The installation of wxWidgets is finished. On certain
platforms (e.g. Linux) you'll now have to run ldconfig
if you installed a shared library and also modify the
LD_LIBRARY_PATH (or equivalent) environment variable.
wxWidgets comes with no guarantees and doesn't claim
to be suitable for any purpose.
Read the wxWindows Licence on licencing conditions.
------------------------------------------------------
让我回到我的壳里。但是,我似乎无法使用它
(myvirtualenv)$ python
>>> import wxversion
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named wxversion
有什么想法可以将它安装在我的 virtualenv 中吗?