robotframework学习3-pip install livetest报错

承接上文,安装HttpLibrary.HTTP需要先安装livetest和json,现在安装livetest也报错了,依旧是兼容性的问题。

解决方法:
1.去https://files.pythonhosted.org/下载livetest压缩包,解压到E:\Program Files (x86)\Python3\Lib\site-packages路径下。
robotframework学习3-pip install livetest报错_第1张图片
robotframework学习3-pip install livetest报错_第2张图片
robotframework学习3-pip install livetest报错_第3张图片

2.修改 \livetest-0.5\livetest_init_.py

修改import httplib -> import http.client as httplib
修改import urlparse -> import urllib.parse
修改from Cookie import BaseCookie, CookieError -> import http.cookiejar
修改XXXError, e 为XXXError as e

3.修改 \livetest-0.5\setup.py

修改long_description=file(‘README.rst’).read() -> long_description=open(‘README.rst’).read()
修改version=livetest.version -> version=‘0.5’
修改author_email=livetest.author -> author_email=‘[email protected]

4.在cmd中切换路径到 \livetest-0.5,执行 python setup.py install,安装成功。

你可能感兴趣的:(RobotFramework)