问题描述
我正在尝试安装wxPython 2.8 unicode版本,以便能够使用robotframework-ride.
I'm trying to install wxPython 2.8 unicode version, to be able to use robotframework-ride.
到目前为止,从站点下载的安装程序失败,并显示错误消息没有要安装的软件"
So far the installer downloaded from the site failed with an error saying "There was no software to install"
使用Brew安装3.0版本,该版本与ride不兼容.
And using Brew installs the 3.0 version, that is not compatible with ride.
我希望在这个问题上有所帮助,我是Mac的新用户(刚在办公室得到一个Mac用户,必须在我的项目中使用它),这是迄今为止我唯一的一件事.根本无法解决.
I would appreciate some help on this issue, I'm a new Mac user (just got given one at the office, and have to use it for my project) , and this is the only thing so far that I haven't been able to solve at all.
我需要安装的版本是:wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7
The version I need to install is: wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7
此版本的OSX似乎根本无法安装该安装程序.
The installer doesn't seem to work at all with this version of OSX.
谢谢你.
推荐答案
我遇到了相同的错误:
$ sudo installer -pkg /Volumes/wxPython2.9-osx-2.9.5.0-cocoa-py2.7/wxPython2.9-osx-cocoa-py2.7.pkg/ -target /
installer: Package name is wxPython2.9-osx-cocoa-py2.7
installer: Installing at base path /
2015-10-19 11:27:48.417 installer[875:22541] Package /Volumes/wxPython2.9-osx-2.9.5.0-cocoa-py2.7/wxPython2.9-osx-cocoa-py2.7.pkg uses a deprecated pre-10.2 format (or uses a newer format but is invalid).
installer: The install failed (The Installer could not install the software because there was no software found to install.)
您可能已经知道,在OS X上, RIDE支持wxPython 2.8和2.9 ,这就是为什么我在这里使用v2.9的原因:
As you may know, on OS X, RIDE supports both wxPython 2.8 and 2.9, and that's why I'm using v2.9 here:
try:
import wxversion
from wxversion import VersionError
if sys.platform == 'darwin': # CAN NOT IMPORT IS_MAC AS THERE IS A wx IMPORT
wxversion.select(['2.8', '2.9'])
else:
wxversion.select('2.8')
except ImportError:
print "wxPython not found."
尽管可以使用 wxmac
公式安装wxPython 2.9.5.0,但在OS X 10.11 El Capitan上,您会在# 16329 ,同时构建wxWidgets.
Although wxmac
formula can be used to install wxPython 2.9.5.0, but on OS X 10.11 El Capitan, you'll encounter the following error reported in #16329 while building wxWidgets.
因此,我们必须从(修改后的)源代码中构建它:
So, we have to build it from (modified) source code:
-
安装Xcode,然后下载
wxPython-src-2.9.5.0.tar.bz2
.
提取压缩包并将#include <WebKit/WebKit.h>
(在src/osx/webview_webkit.mm
中)替换为#include <WebKit/WebKitLegacy.h>
.
Extract the tarball and replace #include <WebKit/WebKit.h>
(in src/osx/webview_webkit.mm
) with #include <WebKit/WebKitLegacy.h>
.
然后按照wxmac
公式中所述的说明来构建和安装wxPython:
Then follow the instructions described in wxmac
formula to build and install wxPython:
$ cd wxPython-src-2.9.5.0
$ PREFIX=/usr/local
$ ./configure --prefix=$PREFIX --enable-shared --enable-monolithic --enable-unicode --enable-std_string --enable-display --with-opengl --with-osx_cocoa --with-libjpeg --with-libtiff --with-libpng --with-zlib --enable-dnd --enable-clipboard --enable-webkit --enable-svg --with-expat --with-macosx-version-min=10.11 --enable-universal_binary=i386,x86_64 --disable-precomp-headers
$ sudo make install
$ cd wxPython
$ sudo python setup.py build_ext WXPORT=osx_cocoa WX_CONFIG=$PREFIX/bin/wx-config UNICODE=1 INSTALL_MULTIVERSION=1 BUILD_GLCANVAS=1 BUILD_GIZMOS=1 BUILD_STC=1
$ sudo python setup.py install WXPORT=osx_cocoa WX_CONFIG=$PREFIX/bin/wx-config UNICODE=1 INSTALL_MULTIVERSION=1 BUILD_GLCANVAS=1 BUILD_GIZMOS=1 BUILD_STC=1
要验证安装:
$ python
>>> import wx
>>>
请注意,这是64位设置,您不必在32位模式下运行RIDE.
Note that this is a 64-bit setup, you don't have to run RIDE in 32-bit mode.
这篇关于在OSX"El Capitan"上安装wxPython 2.8(用于骑行).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!