- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章基于Python在MacOS上安装robotframework-ride由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
robotframework是一个框架,是一个可以用于关键字测试驱动的框架。而ride(robotframework-ride)就是可以使得写robot测试用例更加方便快捷的ide图形操作工具.
安装 。
因为是基于python的,所以其可以运行在多个操作系统上。这里主要介绍一下ride在macos上的使用方式.
os版本 。
macos版本:10.13.2 。
wxpython 。
由于ride是基于wxpython的应用,所以首先需要保证wxpython已经得到了安装。安装命令如下:
安装命令:brew install wxpython 。
安装日志 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
liumiaocn:~ liumiao$ brew install wxpython
=
=
> installing dependencies
for
wxpython: gdbm, readline, sqlite, python@
2
, jpeg, libpng, libtiff, wxmac
=
=
> installing wxpython dependency: gdbm
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
gdbm
-
1.15
.high_sierra.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring gdbm
-
1.15
.high_sierra.bottle.tar.gz
?
/
usr
/
local
/
cellar
/
gdbm
/
1.15
:
19
files,
569.8kb
=
=
> installing wxpython dependency: readline
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
readline
-
7.0
.
3_1
.high_sierra.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring readline
-
7.0
.
3_1
.high_sierra.bottle.tar.gz
=
=
> caveats
this formula
is
keg
-
only, which means it was
not
symlinked into
/
usr
/
local,
because macos provides the bsd libedit library, which shadows libreadline.
in
order to prevent conflicts when programs look
for
libreadline we are
defaulting this gnu readline installation to keg
-
only.
for
compilers to find this software you may need to
set
:
ldflags:
-
l
/
usr
/
local
/
opt
/
readline
/
lib
cppflags:
-
i
/
usr
/
local
/
opt
/
readline
/
include
=
=
> summary
?
/
usr
/
local
/
cellar
/
readline
/
7.0
.
3_1
:
46
files,
1.5mb
=
=
> installing wxpython dependency: sqlite
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
sqlite
-
3.24
.
0.high_sierra
.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring sqlite
-
3.24
.
0.high_sierra
.bottle.tar.gz
=
=
> caveats
this formula
is
keg
-
only, which means it was
not
symlinked into
/
usr
/
local,
because macos provides an older sqlite3.
if
you need to have this software first
in
your path run:
echo
'export path="/usr/local/opt/sqlite/bin:$path"'
>> ~
/
.bash_profile
for
compilers to find this software you may need to
set
:
ldflags:
-
l
/
usr
/
local
/
opt
/
sqlite
/
lib
cppflags:
-
i
/
usr
/
local
/
opt
/
sqlite
/
include
for
pkg
-
config to find this software you may need to
set
:
pkg_config_path:
/
usr
/
local
/
opt
/
sqlite
/
lib
/
pkgconfig
=
=
> summary
?
/
usr
/
local
/
cellar
/
sqlite
/
3.24
.
0
:
11
files,
3.5mb
=
=
> installing wxpython dependency: python@
2
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
python@
2
-
2.7
.
15_1
.high_sierra.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring python@
2
-
2.7
.
15_1
.high_sierra.bottle.tar.gz
=
=
>
/
usr
/
local
/
cellar
/
python@
2
/
2.7
.
15_1
/
bin
/
python
-
s setup.py
-
-
no
-
user
-
cfg install
-
-
force
-
-
verbose
-
-
single
-
version
-
externally
-
mana
=
=
>
/
usr
/
local
/
cellar
/
python@
2
/
2.7
.
15_1
/
bin
/
python
-
s setup.py
-
-
no
-
user
-
cfg install
-
-
force
-
-
verbose
-
-
single
-
version
-
externally
-
mana
=
=
>
/
usr
/
local
/
cellar
/
python@
2
/
2.7
.
15_1
/
bin
/
python
-
s setup.py
-
-
no
-
user
-
cfg install
-
-
force
-
-
verbose
-
-
single
-
version
-
externally
-
mana
=
=
> caveats
pip
and
setuptools have been installed. to update them
pip install
-
-
upgrade pip setuptools
you can install python packages with
pip install <package>
they will install into the site
-
package directory
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
see: https:
/
/
docs.brew.sh
/
homebrew
-
and
-
python
=
=
> summary
?
/
usr
/
local
/
cellar
/
python@
2
/
2.7
.
15_1
:
4
,
673
files,
82.8mb
=
=
> installing wxpython dependency: jpeg
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
jpeg
-
9c
.high_sierra.bottle.tar.gz
curl: (
6
) could
not
resolve host: akamai.bintray.com
error: failed to download resource
"jpeg"
download failed: https:
/
/
homebrew.bintray.com
/
bottles
/
jpeg
-
9c
.high_sierra.bottle.tar.gz
warning: bottle installation failed: building
from
source.
=
=
> downloading http:
/
/
www.ijg.org
/
files
/
jpegsrc.v9c.tar.gz
######################################################################## 100.0%
=
=
> .
/
configure
-
-
disable
-
silent
-
rules
-
-
prefix
=
/
usr
/
local
/
cellar
/
jpeg
/
9c
=
=
> make install
?
/
usr
/
local
/
cellar
/
jpeg
/
9c
:
21
files,
749.8kb
, built
in
33
seconds
=
=
> installing wxpython dependency: libpng
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
libpng
-
1.6
.
34.high_sierra
.bottle.tar.gz
curl: (
6
) could
not
resolve host: akamai.bintray.com
error: failed to download resource
"libpng"
download failed: https:
/
/
homebrew.bintray.com
/
bottles
/
libpng
-
1.6
.
34.high_sierra
.bottle.tar.gz
warning: bottle installation failed: building
from
source.
=
=
> downloading https:
/
/
downloads.sourceforge.net
/
libpng
/
libpng
-
1.6
.
34.tar
.xz
=
=
> downloading
from
https:
/
/
downloads.sourceforge.net
/
project
/
libpng
/
libpng16
/
1.6
.
34
/
libpng
-
1.6
.
34.tar
.xz
######################################################################## 100.0%
=
=
> .
/
configure
-
-
disable
-
silent
-
rules
-
-
prefix
=
/
usr
/
local
/
cellar
/
libpng
/
1.6
.
34
=
=
> make
=
=
> make test
=
=
> make install
?
/
usr
/
local
/
cellar
/
libpng
/
1.6
.
34
:
26
files,
1.2mb
, built
in
1
minute
38
seconds
=
=
> installing wxpython dependency: libtiff
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
libtiff
-
4.0
.
9_3
.high_sierra.bottle.tar.gz
curl: (
6
) could
not
resolve host: akamai.bintray.com
error: failed to download resource
"libtiff"
download failed: https:
/
/
homebrew.bintray.com
/
bottles
/
libtiff
-
4.0
.
9_3
.high_sierra.bottle.tar.gz
warning: bottle installation failed: building
from
source.
=
=
> downloading https:
/
/
download.osgeo.org
/
libtiff
/
tiff
-
4.0
.
9.tar
.gz
curl: (
28
) resolving timed out after
5551
milliseconds
trying a mirror...
=
=
> downloading https:
/
/
fossies.org
/
linux
/
misc
/
tiff
-
4.0
.
9.tar
.gz
######################### 34.8%
######################################################################## 100.0%
=
=
> downloading https:
/
/
mirrors.ocf.berkeley.edu
/
debian
/
pool
/
main
/
t
/
tiff
/
tiff_4.
0.9
-
5.debian
.tar.xz
######################################################################## 100.0%
=
=
> patching
=
=
> applying patches
/
cve
-
2017
-
9935.patch
patching
file
libtiff
/
tif_dir.c
patching
file
tools
/
tiff2pdf.c
=
=
> applying patches
/
cve
-
2017
-
18013.patch
patching
file
libtiff
/
tif_print.c
=
=
> applying patches
/
cve
-
2018
-
5784.patch
patching
file
contrib
/
addtiffo
/
tif_overview.c
patching
file
tools
/
tiff2pdf.c
patching
file
tools
/
tiffcrop.c
=
=
> applying patches
/
cve
-
2017
-
11613_part1
.patch
patching
file
libtiff
/
tif_dirread.c
=
=
> applying patches
/
cve
-
2017
-
11613_part2
.patch
patching
file
libtiff
/
tif_dirread.c
=
=
> applying patches
/
cve
-
2018
-
7456.patch
patching
file
libtiff
/
tif_dirread.c
patching
file
libtiff
/
tif_print.c
=
=
> applying patches
/
cve
-
2017
-
17095.patch
patching
file
tools
/
pal2rgb.c
=
=
> .
/
configure
-
-
prefix
=
/
usr
/
local
/
cellar
/
libtiff
/
4.0
.
9_3
-
-
without
-
x
-
-
with
-
jpeg
-
include
-
dir
=
/
usr
/
local
/
opt
/
jpeg
/
include
-
-
with
-
jpeg
-
=
=
> make install
?
/
usr
/
local
/
cellar
/
libtiff
/
4.0
.
9_3
:
246
files,
3.5mb
, built
in
5
minutes
10
seconds
=
=
> installing wxpython dependency: wxmac
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
wxmac
-
3.0
.
4.high_sierra
.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring wxmac
-
3.0
.
4.high_sierra
.bottle.tar.gz
?
/
usr
/
local
/
cellar
/
wxmac
/
3.0
.
4
:
810
files,
23.7mb
=
=
> installing wxpython
=
=
> downloading https:
/
/
homebrew.bintray.com
/
bottles
/
wxpython
-
3.0
.
2.0_1
.high_sierra.bottle.tar.gz
######################################################################## 100.0%
=
=
> pouring wxpython
-
3.0
.
2.0_1
.high_sierra.bottle.tar.gz
?
/
usr
/
local
/
cellar
/
wxpython
/
3.0
.
2.0_1
:
1
,
108
files,
37.9mb
liumiaocn:~ liumiao$
|
版本确认 。
1
2
3
4
5
6
7
8
9
10
|
liumiaocn:~ liumiao$ brew info wxpython
wxpython: stable
3.0
.
2.0
(bottled)
python bindings
for
wxwidgets
https:
/
/
www.wxwidgets.org
/
/
usr
/
local
/
cellar
/
wxpython
/
3.0
.
2.0_1
(
1
,
115
files,
39.9mb
)
*
poured
from
bottle on
2018
-
06
-
19
at
15
:
52
:
25
from
: https:
/
/
github.com
/
homebrew
/
homebrew
-
core
/
blob
/
master
/
formula
/
wxpython.rb
=
=
> dependencies
required: python@
2
✔, wxmac ✔
liumiaocn:~ liumiao$
|
暂定对应1:wxpython安装之后,目前的版本还缺少一个软连接才能正常动作,根据日志可以看到此次安装的wxpython版本为wxpython-3.0.2.0_1, 按照如下操作创建软连接即可 。
创建链接 。
1
2
3
4
5
6
|
liumiaocn:
bin
liumiao$ pwd
/
usr
/
local
/
bin
liumiaocn:
bin
liumiao$ ls wx
ls: wx: no such
file
or
directory
liumiaocn:
bin
liumiao$ ln
-
s ..
/
cellar
/
wxpython
/
3.0
.
2.0_1
/
lib
/
python2.
7
/
site
-
packages
/
wx
-
3.0
-
osx_cocoa
/
wx wx
liumiaocn:
bin
liumiao$
|
确认方式 。
1
2
3
4
5
|
liumiaocn:~ liumiao$ python
-
c
"import wx; print wx.version"
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
/
wx
-
3.0
-
osx_cocoa
/
wx
/
_core.py:
16633
: userwarning: wxpython
/
wxwidgets release number mismatch
warnings.warn(
"wxpython/wxwidgets release number mismatch"
)
(
3
,
0
,
2
,
0
, '')
liumiaocn:~ liumiao$
|
虽然仍然提示warning信息,但是已经能够正常继续动作了.
安装robotframework-ride 。
使用pip安装robotframework-ride, 安装命令如下 。
安装命令:pip install robotframework-ride 。
启动确认 。
通过ride.py启动ride,当前版本出现了如下错误信息 。
1
2
3
4
5
|
liumiaocn:
bin
liumiao$ ride.py
wrong wxpython version.
you need to install wxpython
2.8
.
12.1
with
unicode
support to run ride.
wxpython
2.8
.
12.1
can be downloaded
from
http:
/
/
sourceforge.net
/
projects
/
wxpython
/
files
/
wxpython
/
2.8
.
12.1
/
liumiaocn:
bin
liumiao$
|
原因确认:经过定位代码中错误出现的位置,确认到如下文件:
1
2
3
4
5
6
7
8
|
liumiaocn:local liumiao$ find .
-
name
'*.py'
|xargs grep
'you need to install wxpython'
.
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py:you need to install wxpython
2.8
.
12.1
with
unicode
support to run ride.
liumiaocn:local liumiao$ view .
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py
liumiaocn:local liumiao$ grep supported_versions .
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py
supported_versions
=
[
"2.8"
]
supported_versions.append(
"2.9"
)
wxversion.select(supported_versions)
liumiaocn:local liumiao$
|
对应方法1:直接将支持的版本号修改为当前的版本 。
1
2
3
4
5
6
7
|
liumiaocn:~ liumiao$ diff
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py.org
37
,
38c37
<
#supported_versions = ["2.8"]
< supported_versions
=
[
"3.0.2.0"
]
-
-
-
> supported_versions
=
[
"2.8"
]
liumiaocn:~ liumiao$
|
对应方法2:添加supported_versions 。
1
2
3
4
|
liumiaocn:~ liumiao$ diff
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py
/
usr
/
local
/
lib
/
python2.
7
/
site
-
packages
/
robotide
/
__init__.py.org
44d43
< supported_versions.append(
"3.0.2.0"
)
liumiaocn:~ liumiao$
|
实际上在如下行添加了对当前版本的支持 。
1
2
3
4
5
6
7
8
|
try
:
import
wxversion
from
wxversion
import
versionerror
if
sys.platform
=
=
'darwin'
:
supported_versions.append(
"2.9"
)
supported_versions.append(
"3.0.2.0"
)
wxversion.select(supported_versions)
import
wx
|
安装robotframework 。
使用pip install robotramework进行robotframework的安装 。
1
2
3
4
5
6
7
8
9
10
11
|
liumiaocn:~ liumiao$ pip install robotframework
collecting robotframework
downloading https:
/
/
files.pythonhosted.org
/
packages
/
95
/
b1
/
4faa12e1950b9fbd00060c112fa6f828c4f3998e9b2f8c570c22db10bc88
/
robotframework
-
3.0
.
4.tar
.gz (
443kb
)
100
%
|████████████████████████████████|
450kb
34kb
/
s
building wheels
for
collected packages: robotframework
running setup.py bdist_wheel
for
robotframework ... done
stored
in
directory:
/
users
/
liumiao
/
library
/
caches
/
pip
/
wheels
/
8a
/
01
/
4a
/
fd9aef57cca0087d0bd5ceba5db39247ef375fdc4df5ebfb59
successfully built robotframework
installing collected packages: robotframework
successfully installed robotframework
-
3.0
.
4
liumiaocn:~ liumiao$
|
启动ride 。
在命令行输入ride.py并回车,便可启动ride 。
安装pygments 。
text edit的tab提示需要安装高亮显示用的包pygments 。
使用pip install pygments进行安装 。
1
2
3
4
5
6
7
|
liumiaocn:~ liumiao$ pip install pygments
collecting pygments
downloading https:
/
/
files.pythonhosted.org
/
packages
/
02
/
ee
/
b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca
/
pygments
-
2.2
.
0
-
py2.py3
-
none
-
any
.whl (
841kb
)
100
%
|████████████████████████████████|
849kb
1.9mb
/
s
installing collected packages: pygments
successfully installed pygments
-
2.2
.
0
liumiaocn:~ liumiao$
|
再次启动ride.py,已经可以正常动作了.
总结 。
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对我的支持。如果你想了解更多相关内容请查看下面相关链接 。
原文链接:https://blog.csdn.net/liumiaocn/article/details/80739206 。
最后此篇关于基于Python在MacOS上安装robotframework-ride的文章就讲到这里了,如果你想了解更多关于基于Python在MacOS上安装robotframework-ride的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我正在处理一组标记为 160 个组的 173k 点。我想通过合并最接近的(到 9 或 10 个组)来减少组/集群的数量。我搜索过 sklearn 或类似的库,但没有成功。 我猜它只是通过 knn 聚类
我有一个扁平数字列表,这些数字逻辑上以 3 为一组,其中每个三元组是 (number, __ignored, flag[0 or 1]),例如: [7,56,1, 8,0,0, 2,0,0, 6,1,
我正在使用 pipenv 来管理我的包。我想编写一个 python 脚本来调用另一个使用不同虚拟环境(VE)的 python 脚本。 如何运行使用 VE1 的 python 脚本 1 并调用另一个 p
假设我有一个文件 script.py 位于 path = "foo/bar/script.py"。我正在寻找一种在 Python 中通过函数 execute_script() 从我的主要 Python
这听起来像是谜语或笑话,但实际上我还没有找到这个问题的答案。 问题到底是什么? 我想运行 2 个脚本。在第一个脚本中,我调用另一个脚本,但我希望它们继续并行,而不是在两个单独的线程中。主要是我不希望第
我有一个带有 python 2.5.5 的软件。我想发送一个命令,该命令将在 python 2.7.5 中启动一个脚本,然后继续执行该脚本。 我试过用 #!python2.7.5 和http://re
我在 python 命令行(使用 python 2.7)中,并尝试运行 Python 脚本。我的操作系统是 Windows 7。我已将我的目录设置为包含我所有脚本的文件夹,使用: os.chdir("
剧透:部分解决(见最后)。 以下是使用 Python 嵌入的代码示例: #include int main(int argc, char** argv) { Py_SetPythonHome
假设我有以下列表,对应于及时的股票价格: prices = [1, 3, 7, 10, 9, 8, 5, 3, 6, 8, 12, 9, 6, 10, 13, 8, 4, 11] 我想确定以下总体上最
所以我试图在选择某个单选按钮时更改此框架的背景。 我的框架位于一个类中,并且单选按钮的功能位于该类之外。 (这样我就可以在所有其他框架上调用它们。) 问题是每当我选择单选按钮时都会出现以下错误: co
我正在尝试将字符串与 python 中的正则表达式进行比较,如下所示, #!/usr/bin/env python3 import re str1 = "Expecting property name
考虑以下原型(prototype) Boost.Python 模块,该模块从单独的 C++ 头文件中引入类“D”。 /* file: a/b.cpp */ BOOST_PYTHON_MODULE(c)
如何编写一个程序来“识别函数调用的行号?” python 检查模块提供了定位行号的选项,但是, def di(): return inspect.currentframe().f_back.f_l
我已经使用 macports 安装了 Python 2.7,并且由于我的 $PATH 变量,这就是我输入 $ python 时得到的变量。然而,virtualenv 默认使用 Python 2.6,除
我只想问如何加快 python 上的 re.search 速度。 我有一个很长的字符串行,长度为 176861(即带有一些符号的字母数字字符),我使用此函数测试了该行以进行研究: def getExe
list1= [u'%app%%General%%Council%', u'%people%', u'%people%%Regional%%Council%%Mandate%', u'%ppp%%Ge
这个问题在这里已经有了答案: Is it Pythonic to use list comprehensions for just side effects? (7 个答案) 关闭 4 个月前。 告
我想用 Python 将两个列表组合成一个列表,方法如下: a = [1,1,1,2,2,2,3,3,3,3] b= ["Sun", "is", "bright", "June","and" ,"Ju
我正在运行带有最新 Boost 发行版 (1.55.0) 的 Mac OS X 10.8.4 (Darwin 12.4.0)。我正在按照说明 here构建包含在我的发行版中的教程 Boost-Pyth
学习 Python,我正在尝试制作一个没有任何第 3 方库的网络抓取工具,这样过程对我来说并没有简化,而且我知道我在做什么。我浏览了一些在线资源,但所有这些都让我对某些事情感到困惑。 html 看起来
我是一名优秀的程序员,十分优秀!