|
Installation
Installation and uninstallation instructions
IntroductionThese instructions cover the basic procedure for getting Robot Framework installed. See the User Guide for more detailed installation instructions, as well as for information where files are installed, how to install the framework manually without Python, etc. Robot Framework can be installed from source or using Windows installer or Easy Install. Before using any of these methods, you need to make sure that needed preconditions are installed. Windows users can use One Click Installer to install preconditions and Robot Framework itself in one go. After a successful installation you should be able to execute following commands on the command prompt: $ pybot --version Robot Framework 2.1 (Python 2.5.2 on linux2) $ jybot --version Robot Framework 2.1 (Jython 2.2 on java1.6.0_03) The latter command works only if you have installed Jython. In both cases, the exact version and platform information can, of course, differ from these. With jybot you also get some notifications from Jython package manager upon the first execution. To continue from here, you can take a look at the Quick Start Guide which introduces the most important features and acts also as an executable demo. Installing from sourceThis installation method can be used on any operating system having Python installed. Installing from source can sound a bit scary for some people, but the procedure is actually pretty straightforward. A benefit of this approach is that you get all documentation, tools and templates with the source code. You can get the source code either as a source distribution package or checkout it directly from our version control system. In the former case, first extract the package somewhere, and as a result, you have a directory named robotframework-<version>. After that you just need to go to the created directory and run the python setup.py install command. For more detailed instructions, see the User Guide. Using Windows installerThere is a special graphical installer for Windows operating system. Simply double click the provided installer and follow the instructions. NOTE: If you are installing Robot Framework using Python 2.6, you need to set the Python installation directory to PATH environment variable before the installation. How to set environment variables is explained below. On Windows Vista installing Robot Framework requires administrator privileges. Select Run as administrator from the context menu when starting the installer. After the installation, you probably want to make Robot Framework's runner scripts easily available from the command line. This is done by editing PATH environment variable as follows:
Notice that <PythonInstallationDir>\Scripts directory is not created by Python installer, but it will be created automatically when Robot Framework is installed. Using Easy InstallIf Python package managing tool Easy Install is available, installing Robot Framework is as easy as running command easy_install robotframework or something like easy_install robotframework==2.0.4 if you want to get a specific version. When using Easy Install on Windows, you need to run robot_postinstall.py script after the installation to configure the runner scripts (pybot, jybot, rebot). The installation output should define where the post-install script is located, and you can execute it by double clicking it or running it from command line like python <PythonInstallationDir>\Scripts\robot_postinstall.py. On OS X updating the runner script fails when using Easy Install with virtualenv because the installation picks up the system wide Python installation (issue 236). A workaround is updating runner scripts manually after the installation or installing from source. If you need to use a proxy to access the Internet, you can tell Easy Install to use it by setting the http_proxy environment variable. Using One Click InstallerIf you are using Windows XP and do not have preconditions installed, you can use One Click Installer to both install everything and to set needed environment variables. To use One Click Installer, you need to download also Robot Framework, Python and Jython (optional) installers separately. For more details, see One Click Installer's wiki page. PreconditionsRobot Framework runs both on Python and Jython, and you need to have at least one of them to be able to use it. However, the provided installers only work with Python, so installing it is always recommended. Python installationLatest Python 2.6 or 2.5 versions are recommended, although Python 2.4 and 2.3 are also supported. On most UNIX-like systems, you have Python installed by default. If you are on Windows or otherwise need to install Python yourself, your best place to start is probably the Python homepage. There you can download a suitable installer and get more information about the installation and Python in general. NOTE: Robot Framework is not compatible with Python 3.x versions. Python 3.0 was intentionally backwards incompatible with earlier Python releases, and supporting it as long as we need to support very old Python versions (most notably Jython 2.2) is not feasible. On Windows, and especially on Windows Vista, it is recommended to install Python to all users, and to run the installation as an administrator. Jython installationUsing test libraries implemented with Java or using Java tools directly requires running Robot Framework on Jython, which then requires Java Runtime Environment (JRE). The minimum required Java version is 1.4, but newer versions are recommended, as they tend to be faster with dynamic languages, such as Jython. Both Sun and IBM Java versions are supported. Robot Framework requires Jython version 2.2. The earlier Jython version 2.1 is not compatible with Robot, and also 2.2 betas and alphas have some problems and are not supported. Unfortunately, also Jython 2.2.1 has certain Unicode problems which makes it incompatible with Robot Framework if Unicode support is needed. Installing Jython is a fairly easy procedure. First you need to get an installer from the Jython homepage or directly from http://downloads.sourceforge.net/jython/jython_installer-2.2.jar. Note that the installer is an executable JAR package, which you need to run as java -jar jython_installer-2.2.jar. Depending on your system, the installer runs either in the graphical or the textual mode, but in both cases, the actual installation steps are very simple. When installing Robot Framework, its installer tries to find the Jython executable on the system to create the jybot runner script correctly. Jython is found if:
UninstallationIf Robot Framework has been installed using a source distribution, it can be uninstalled with command: python install.py uninstall If Windows installer has been used, the uninstallation can be done using Control Panel > Add/Remove Programs. Robot Framework is listed under Python applications. If uninstallation fails somehow or you have used Easy Install, Robot Framework can be uninstalled by removing the framework code and runner scripts manually. See the User Guide for more details. UpgradingThe procedure when upgrading or downgrading Robot Framework depends on the versions used:
With source distributions, you first need to get the new package, and after that run the following command, which automatically takes care of the uninstallation: python install.py reinstall With Easy Install you can simply run: easy_install robotframework==<new-version> Regardless on the version or installation method, you do not need to reinstall preconditions or set PATH environment variable again. |
Sign in to add a comment
I had problems using pybot after installing inside a virtualenv. It looks like the pybot script is not done using a script entry point so smth like that.
The "runner.py" script is referenced in there -- I edited the pybot script to point it to the virtualenv.
What is your Operating System? If you are using Mac, see issue 236. Otherwise, please submit issue with more details about operating system and error traces etc.
Got this error trying to install RobotFrame? Work.
run_installscript: internal error 0xFFFFFFFF
What to do now?
Joe, could you provide some more information about your problem? For example operating system, installer used, framework version and Python version.
I have the same error message with @joe, my environment:Windows7 RC, Python 3.1 RobotFramework? 2.1-win
And this also happen on Windows Vista Ultimate, Python 3.0, RobotFramework? 2.1-win.
After all steps finished, this error message displayed at end. run_installscript: internal error 0xFFFFFFFF
Robot Framework is not compatible with Python 3.x. Please try installing it with Python 2.6.x and sorry for not documenting this better.
I am getting below error after executing test case with robot on linux: ImportError?: No module named expat; use SimpleXMLTreeBuilder instead
python version:python2.5.2 jython version:Jython 2.2.1 robot version:robot2.1
Could you please help me out here?
Savita, please submit this problem to the issue tracker. Also include in the report the full stacktrace (if you got any), tell how did you try to run tests, your operating system, etc.
C:\>ride.py c:\ 'import site' failed; use -v for traceback Traceback (most recent call last):
I will appreciate your assistance!!!
Vlad.Sanchez, it seems your Python installation is somehow messed up. Can you run e.g. 'python -V' successfully and start Python interpreter by typing just 'python'?
Running 'ride.py c:\' may not be that good idea either because it will open the whole c drive as a test suite. That shouldn't have anything to do with your problem, though.
Minor inconsistency in Upgrade procedure
Environment
Steps how to reproduce
The Installation document tells how to update:
This doesn't work though:
Possible fix
Give install argument to setup.py script instead of reinstall.
Fix confirmation
Notice that you need to run python install.py reinstall not python setup.py reinstall.
setup.py is more-or-less standard Python setup script which doesn't know anything about re-installation. install.py is our custom script that uses setup.py for installation and implements re- and un-installation itself by simply removing all found RF files and dirs.
Notice also that most of the time, and especially when upgrading to a newer minor version, you can simply install the new version over existing.
Hi,
There is a tiny little inconsistency when installing under Ubuntu (or Debian) with easy_install without options:
Then:
A workaround consists in installing RF in /usr/lib, but this requires two options:
Unfortunately, that "taints" /usr/lib with non Debian-packaged files (would be OK in /usr/local/lib.)
Régis
(see issue #434)