提问者:小点点

在Eclipse MacOSX红色编辑器-收到致命错误,RF框架没有安装在jython


我使用MacOSX和使用Eclipse光子与红色机器人编辑器。

由于下面显示了致命错误,尝试使用终端将机器人框架安装到jython中。但它显示RF已经安装到系统中。

Eclipse中的致命错误:

Type FATAL: Python installation /usr/local/Cellar/jython/2.7.1/bin has no Robot installed. Fix this problem to build project.

终端说:

GKs-MacBook-Pro:bin roja$ pip install robotframework
Requirement already satisfied: robotframework in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

请帮助我在Mac中为Jython安装机器人框架。由于我使用Eclipse和RobotFramework,我确实需要python和jython。但是系统会考虑Mac中的python路径。

执行的命令:

GKs-MacBook-Pro:bin roja$ jython -m pip install robotframework

.. contains neither jython-dev.jar nor jython.jar.
Try running this script from the 'bin' directory of an installed Jython 
or setting JYTHON_HOME.
usage: jython [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `jython -h' for more information.

GKs-MacBook-Pro:bin roja$ cd
GKs-MacBook-Pro:~ roja$ set JYTHON_HOME=/usr/local/Cellar/jython/2.7.1/
GKs-MacBook-Pro:~ roja$ set JYTHON_PATH=/usr/local/Cellar/jython/2.7.1/bin
GKs-MacBook-Pro:~ roja$ cd /usr/local/Cellar/jython/2.7.1/bin
GKs-MacBook-Pro:bin roja$ jython -m pip install robotframework

.. contains neither jython-dev.jar nor jython.jar.
Try running this script from the 'bin' directory of an installed Jython or setting JYTHON_HOME.
usage: jython [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `jython -h' for more information.

共1个答案

匿名用户

从下到上:当你发出命令pip时,它会执行来自 /bin的命令,该命令与命令输出中的默认Python-python2.7绑定。因此,您不是安装到jython,而是尝试将robotFramework安装到python2.7:

GKs-MacBook-Pro:bin roja$ pip install robotframework
Requirement already satisfied: robotframework in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

通过pip-V验证默认pip使用了哪个python交互器

换句话说,您需要使用适当的pip将包安装到适当的python解释器。

首先尝试如果你有"pip"下jython路径:ls /usr/local/Cellar/jython/2.7.1/bin

或者通过将pip作为jython模块运行:jython-m pip--version

如果是这样,请从usr/local/Cellar/jython/2.7.1/bin或通过jython-m pip install robotframe执行pip

希望有帮助。