我想安装Selenium2Library。
当我跑步时:
sudo easy_install robotframework-selenium2library
在我的Ubuntu控制台中我收到错误:
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 242, in runner
_execfile(setup_script, ns)
File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line 46, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-msislfw7/robotframework-selenium2library-1.7.4/setup.py", line 11, in <module>
NameError: name 'execfile' is not defined
这是Python 2.7和Python 3.4之间的版本冲突吗? 我可以提供更多信息吗?
修改
当我跑步时:
pip install robotframework-selenium2library
我收到错误:
Collecting robotframework-selenium2library
Using cached robotframework-selenium2library-1.7.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-hw1y4ldv/robotframework-selenium2library/setup.py", line 11, in <module>
execfile(join(dirname(__file__), 'src', 'Selenium2Library', 'version.py'))
NameError: name 'execfile' is not defined
也许我混淆了我的Python 2.7和Python 3.4,因为execfile仅由Python 2.7使用。如何解决这个问题?