My favorites | Sign in
Logo
                
Search
for
Updated Sep 03, 2009 by pekka.klarck
Labels: Featured
Installation  
Installation and uninstallation instructions

Introduction

These 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 source

This 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 installer

There 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:

  1. Open Start > Settings > Control Panel > System > Advanced > Environment Variables. There are User variables and System variables, and the difference between them is that User variables affect only the current users, whereas System variables affect all users.
  2. To edit the existing PATH, select Edit and add ;<PythonInstallationDir>\Scripts\ at the end of the value. Note that the leading colon (;) is important, as it separates different entries. To add a new value, select New and provide both the name and the value, this time without the colon.
  3. Start a new command prompt for the changes to take effect.

Notice that <PythonInstallationDir>\Scripts directory is not created by Python installer, but it will be created automatically when Robot Framework is installed.

Using Easy Install

If 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 Installer

If 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.

Preconditions

Robot 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 installation

Latest 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 installation

Using 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:

  1. Jython can be executed in the system directly (i.e. it is in the PATH).
  2. An environment variable JYTHON_HOME is set and it points to the Jython installation directory.
  3. The installer finds the Jython installation directory from the system. On Windows, it is searched from the C:\ and D:\ drives, and on other systems from the /usr/local and /opt directories. The directory is found if it is under the searched directories mentioned above, or one level deeper. For example, the following Jython installation directories would be found by the installer:
    • C:\APPS\Jython2.2
    • D:\Jython22
    • /usr/local/jython2.2
    • /opt/whatever/Jython22

Uninstallation

If 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.

Upgrading

The 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.


Comment by stefan.eletzhofer, Jun 30, 2009

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.

Comment by jprantan, Jul 01, 2009

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.

Comment by joe...@yahoo.com, Jul 06, 2009

Got this error trying to install RobotFrame? Work.

run_installscript: internal error 0xFFFFFFFF

What to do now?

Comment by pekka.klarck, Jul 07, 2009

Joe, could you provide some more information about your problem? For example operating system, installer used, framework version and Python version.

Comment by chouti, Jul 23, 2009

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

Comment by pekka.klarck, Jul 23, 2009

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.

Comment by savita.s...@gmail.com, Aug 12, 2009

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?

Comment by pekka.klarck, Aug 12, 2009

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.

Comment by Vlad.Sanchez, Sep 25, 2009

C:\>ride.py c:\ 'import site' failed; use -v for traceback Traceback (most recent call last):

File "C:\Python26\Scripts\ride.py", line 20, in ?
from robotide import main
File "C:\Python26\Lib\site-packages\robotide\init.py", line 33, in ?
import os
File "C:\Python26\Lib\os.py", line 120
from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,

I will appreciate your assistance!!!

Comment by pekka.klarck, Sep 29, 2009

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.

Comment by timo.taskinen, Oct 30, 2009

Minor inconsistency in Upgrade procedure

Environment

Steps how to reproduce

The Installation document tells how to update:

python install.py reinstall

This doesn't work though:

/tmp/robotframework-2.1.2 $ sudo python setup.py reinstall
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'reinstall'

Possible fix

Give install argument to setup.py script instead of reinstall.

/tmp/robotframework-2.1.2 $ sudo python setup.py install

Fix confirmation

$ pybot --version
Robot Framework 2.1.2 (Python 2.4.3 on linux2)
Comment by pekka.klarck, Oct 30, 2009

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.

Comment by pekka.klarck, Oct 30, 2009

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.

Comment by rdesgrop...@gmail.com, Nov 27, 2009

Hi,

There is a tiny little inconsistency when installing under Ubuntu (or Debian) with easy_install without options:

$ sudo easy_install robotframework
...
Installation directory: /*usr/lib*/python2.6/dist-packages/robotframework-2.1.2-py2.6.egg/robot
...
Installed /*usr/local/lib*/python2.6/dist-packages/robotframework-2.1.2-py2.6.egg

Then:

$ pybot
/usr/bin/python: can't open file '/usr/lib/python2.6/dist-packages/robotframework-2.1.2-py2.6.egg/robot/runner.py': [Errno 2] No such file or directory

A workaround consists in installing RF in /usr/lib, but this requires two options:

$ sudo easy_install robotframework --install-layout deb --force-installation-into-system-dir

Unfortunately, that "taints" /usr/lib with non Debian-packaged files (would be OK in /usr/local/lib.)

Régis

Comment by rdesgrop...@gmail.com, Dec 01, 2009

(see issue #434)


Sign in to add a comment
Hosted by Google Code