RIDE 安装:robot --version 失败

RIDE installation: robot --version failing

我正在尝试在我的系统上安装 robotframework OS CentOS 7.

我已经安装了python

 python --version
 Python 2.7.5

pip 已安装

pip --version
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)

robotframework 已安装

pip install robotframework
Requirement already satisfied (use --upgrade to upgrade): robotframework in /usr/lib/python2.7/site-packages

但是,当我检查机器人安装时,出现以下错误

robot --version
Traceback (most recent call last):
File "/usr/bin/robot", line 9, in <module>
load_entry_point('robotframework==5.0.1', 'console_scripts', 'robot')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/robot/__init__.py", line 43, in <module>
from robot.rebot import rebot, rebot_cli
File "/usr/lib/python2.7/site-packages/robot/rebot.py", line 40, in <module>
from robot.conf import RebotSettings
File "/usr/lib/python2.7/site-packages/robot/conf/__init__.py", line 27, in <module>
from .settings import RobotSettings, RebotSettings
File "/usr/lib/python2.7/site-packages/robot/conf/settings.py", line 89
raise DataError(f'Invalid option{s(opts)} {seq2str(opts)}.')

知道这里有什么问题吗?

查看安装 instructions。我怀疑你至少需要 python 3.6 来自资源:

Robot Framework requires Python 3.6 or newer. If you need to use Python 2, Jython or IronPython, you can use Robot Framework 4.1.3.

您应该卸载该版本并使用 Python 3(如提到的@jiri-janous)。

sudo pip uninstall robotframework
sudo yum install python3 python3-pip
sudo python3 -m pip install robotframework

注意:对于 RIDE 安装,请参阅其 project pages and FAQ