[英]python version for robot framework selenium2library (Windows10)
Env: Windows 10 Pro 信封:Windows 10 Pro
I installed python 2.7.9 and using pip
installed robotframework
and robotframework-selenium2library
and it all worked fine with no errors. 我安装了python 2.7.9,并使用
pip
安装了robotframework
和robotframework-selenium2library
,并且一切正常,没有错误。
Then I was doing some research and found that unless there is a reason for me to use 2.x versions of Python, I should stick with 3.x versions. 然后我进行了一些研究,发现除非我没有理由使用2.x版本的Python,否则我应该坚持使用3.x版本。 Since 3.4 support already exists for selenium2library (read somewhere), so I decided to switch to it.
由于3.4已经支持selenium2library (在某处阅读),因此我决定切换到它。
I uninstalled python 2.7.9
and installed python 3.4
version. 我卸载了
python 2.7.9
并安装了python 3.4
版本。 When I installed robotframerwork
, I am getting the following: 当我安装
robotframerwork
,得到以下信息:
C:\\Users\\username>
pip install robotframework
C:\\ Users \\ username>
pip install robotframework
Downloading/unpacking RobotFramework Running setup.py (path:C:\\Users\\username\\AppData\\Local\\Temp\\pip_build_username\\RobotFramework\\setup.py) egg_info for package RobotFramework no previously-included directories found matching 'src\\robot\\htmldata\\testdata' Installing collected packages: RobotFramework Running setup.py install for RobotFramework File "C:\\Python34\\Lib\\site-packages\\robot\\running\\timeouts\\ironpython.py", line 57 raise self._error[0], self._error[1], self._error[2] ^ SyntaxError: invalid syntax File "C:\\Python34\\Lib\\site-packages\\robot\\running\\timeouts\\jython.py", line 56 raise self._error[0], self._error[1], self._error[2] ^ SyntaxError: invalid syntax no previously-included directories found matching 'src\\robot\\htmldata\\testdata' replacing interpreter in robot.bat and rebot.bat.下载/解压缩正在运行setup.py的RobotFramework(路径:C:\\ Users \\ username \\ AppData \\ Local \\ Temp \\ pip_build_username \\ RobotFramework \\ setup.py)egg_info的软件包RobotFramework未找到与“ src \\ robot \\ htmldata \\”匹配的先前包含的目录testdata'安装收集的软件包:RobotFramework为RobotFramework文件“ C:\\ Python34 \\ Lib \\ site-packages \\ robot \\ running \\ timeouts \\ ironpython.py”运行setup.py安装,第57行引发self._error [0],self。 _error [1],self._error [2] ^ SyntaxError:无效的语法文件“ C:\\ Python34 \\ Lib \\ site-packages \\ robot \\ running \\ timeouts \\ jython.py”,第56行引发self._error [0], self._error [1],self._error [2] ^ SyntaxError:语法无效,未找到与“ src \\ robot \\ htmldata \\ testdata”匹配的先前包含的目录,从而替换了robot.bat和rebot.bat中的解释器。 Successfully installed RobotFramework Cleaning up...
成功安装了RobotFramework清理中...
When I did pip list I do see robotframework is installed. 当我完成点子列表时,我确实看到安装了robotframework。
C:\Users\username>pip list pip (1.5.4) robotframework (3.0) setuptools (2.1)
Should I be concerned and stick to Python 2.7.9
? 我应该关注并坚持使用
Python 2.7.9
吗?
如果您使用的是python 3.x,则可以使用此命令安装Selenium2Library
pip install https://github.com/HelioGuilherme66/robotframework-selenium2library/archive/v1.8.0a1.zip
With python 2.7.9 you can only install robotframework 2.9 使用python 2.7.9只能安装robotframework 2.9
With python 3.X you can install robotframework 3.x+ but as Bryan Oakley said, Selenium2Library is not yet supported ;) 使用python 3.x,您可以安装robotframework 3.x +,但是正如Bryan Oakley所说的,尚不支持Selenium2Library;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.