Install wxPython 2.8 (for Ride) on OSX "El Capitan"

I am trying to install the unicode version for wxPython 2.8 to be able to use robotframework-ride.

Until now, the installer downloaded from the site could not say with an error "There was no software to install"

And using Brew installs version 3.0, which is incompatible with riding.

I would appreciate some help on this issue, I am a new Mac user (I just got it at the office and should use it for my project), and this is the only thing so far that I could generally solve.

The version I need to install is: wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7

The installer does not work with this version of OSX at all.

Thank you at advace.

+4
source share
2 answers

I ran into the same error:

$ 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.)

As you know, in OS X RIDE supports both wxPython 2.8 and 2.9 , and so I use 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."

Although the wxmacformula can be used to install wxPython 2.9.5.0, in OS X 10.11 El Capitan you will encounter the following error, described in # 16329, when building wxWidgets.

So, we have to build it from the (modified) source code:

  • Install Xcode and downloadwxPython-src-2.9.5.0.tar.bz2 .

  • Remove the tarball and replace #include <WebKit/WebKit.h>(c src/osx/webview_webkit.mm) with #include <WebKit/WebKitLegacy.h>.

, wxmac, 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- , RIDE 32- .

+3

wxPython 3.0 RIDE. :

decorator (4.0.6)
docutils (0.12)
ecdsa (0.13)
Flask (0.10.1)
gunicorn (19.0.0)
itsdangerous (0.24)
Jinja2 (2.7.3)
MarkupSafe (0.23)
paramiko (1.16.0)
pip (7.1.2)
pycrypto (2.6.1)
robotframework (3.0)
robotframework-databaselibrary (0.6)
robotframework-rammbock (0.4.0.1)
robotframework-requests (0.4.0)
robotframework-ride (1.5.1)
robotframework-selenium2library (1.7.4)
robotframework-sshlibrary (2.1.2)
selenium (2.48.0)
setuptools (18.7.1)
vboxapi (1.0)
Werkzeug (0.9.6)
wheel (0.26.0)
wxPython (3.0.2.0)
wxPython-common (3.0.2.0)

wxPython . homebrew:

$homebrew install wxPython (will install 3.0.2.0)
$pip install robotframework (will install 3.0)
$pip install robotframework-ride (will install 1.5.1)

3.0 '~/homebrew/lib/python2.7/site-packages/robotide/__ init __. py':

if sys.platform == 'darwin':
    supported_versions.append("2.9")
    supported_versions.append("3.0")

~/.robotframework ride.py, RIDE . script ~/homebrew/bin/ride:

#!/bin/sh
rm -rf ~/.robotframework
~/homebrew/bin/ride.py

chmod + x ~/homebrew/bin/ride. "", - .

+3

Source: https://habr.com/ru/post/1611675/


All Articles