python+robotframework+Autoitlibrary 自动化测试安装踩坑

python+robotframework+Autoitlibrary 自动化测试安装踩坑,第1张

python+robotframework+Autoitlibrary 自动化测试安装踩坑

最近在使用python3.7安装Autoitlibrary库的时候出现了报错,据我所知目前robotframework 支持的最新版本就是python3.7了,之前用python3.8安装的时候踩过坑,但是人总是不长记性,这两条再次安装的时候忘了痛了,在一台电脑上死活装不上这个库,报错如下:

ERROR: Command errored out with exit status 1: command: 'c:usersacerappdatalocalprogramspythonpython37-32python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\acer\AppData\Local\Temp\pip-install-kuass9n1\robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236\setup.py'"'"'; __file__='"'"'C:\Users\acer\AppData\Local\Temp\pip-install-kuass9n1\robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersacerAppDataLocalTemppip-record-gt03t64finstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersacerappdatalocalprogramspythonpython37-32Includerobotframework-autoitlibrary' cwd: C:UsersacerAppDataLocalTemppip-install-kuass9n1robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236 Complete output (10 lines): Don't think we need to unregister the old one... Here is from 32bit OS %SYSTEMROOT%system32regsvr32.exe /S "c:usersacerappdatalocalprogramspythonpython37-32Libsite-packagesAutoItLibrarylibAutoItX3.dll" Traceback (most recent call last): File "", line 1, in File "C:UsersacerAppDataLocalTemppip-install-kuass9n1robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236setup.py", line 75, in subprocess.check_call(cmd, shell=True) File "c:usersacerappdatalocalprogramspythonpython37-32libsubprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '%SYSTEMROOT%system32regsvr32.exe /S "c:usersacerappdatalocalprogramspythonpython37-32Libsite-packagesAutoItLibrarylibAutoItX3.dll"' returned non-zero exit status 5. ---------------------------------------- ERROR: Command errored out with exit status 1: 'c:usersacerappdatalocalprogramspythonpython37-32python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\acer\AppData\Local\Temp\pip-install-kuass9n1\robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236\setup.py'"'"'; __file__='"'"'C:\Users\acer\AppData\Local\Temp\pip-install-kuass9n1\robotframework-autoitlibrary_bf618cc8db3d4f6aa9e133faf3daf236\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersacerAppDataLocalTemppip-record-gt03t64finstall-record.txt' --single-version-externally-managed --compile --install-headers 'c:usersacerappdatalocalprogramspythonpython37-32Includerobotframework-autoitlibrary' Check the logs for full command output.

最后百度了一下红色部分,没想到有大佬已经踩过这个坑,于是记录一下,安装的时候一定要用管理员身份安装,因为需要注册autoit的dll插件:

这样就能成功安装 Autoitlibrary库了:

这样妈妈再也不用担心我不会windows gui自动化测试了。 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5652058.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存