我尝试安装desktoplibrary,但出现以下错误:
pip install robotframework-desktoplibrary
Collecting robotframework-desktoplibrary
Downloading https://files.pythonhosted.org/packages/2f/dc/02d773cb2a052a77b226
e11a7104d506ecb827798bb4395757104eb0118f/robotframework-desktoplibrary-1.0.1.zip
(15.6MB)
|████████████████████████████████| 15.6MB 1.7MB/s
ERROR: Command errored out with exit status 1:
command: 'c:\users\sqaadmin\appdata\local\programs\python\python37\python.e
xe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sqaadmin
\\AppData\\Local\\Temp\\1\\pip-install-1m3ui56u\\robotframework-desktoplibrary\\
setup.py'"'"'; __file__='"'"'C:\\Users\\sqaadmin\\AppData\\Local\\Temp\\1\\pip-i
nstall-1m3ui56u\\robotframework-desktoplibrary\\setup.py'"'"';f=getattr(tokenize
, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'
"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-ba
se 'C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotframework-d
esktoplibrary\pip-egg-info'
cwd: C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotf
ramework-desktoplibrary\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotfra
mework-desktoplibrary\setup.py", line 4, in <module>
execfile(join(dirname(abspath(__file__)), 'target', 'src', 'SikuliLibrar
y', 'version.py'))
NameError: name 'execfile' is not defined
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.
正在安装的库不支持Python3。它在setup.py文件中使用的“ execfile” python函数在python3中已弃用,因此,您会遇到这种错误。
[如果您打算测试Windows桌面,则可以将windappdriver与https://github.com/Accruent/robotframework-zoomba的桌面库部分一起使用