---
title: Install Robot Framework in a Python virtual environment
description: Robot Framework and its libraries are ordinary Python packages. Install
  them per project, in a virtual environment, with pinned versions. That is the…
source_url:
  html: https://testingbot.com/resources/courses/robot-framework/install-robot-framework
  md: https://testingbot.com/resources/courses/robot-framework/install-robot-framework.md
---

Course

[Robot Framework Tutorial for Web Testing](https://testingbot.com/resources/courses/robot-framework)

Chapter 2 of 10

1. [1 Robot Framework Tutorial for Beginners](https://testingbot.com/resources/courses/robot-framework)
2. [2 Install Robot Framework in a Python virtual environment](https://testingbot.com/resources/courses/robot-framework/install-robot-framework)
3. [3 Your first Robot Framework test with SeleniumLibrary](https://testingbot.com/resources/courses/robot-framework/first-test-with-seleniumlibrary)
4. [4 Variables, resource files and user keywords](https://testingbot.com/resources/courses/robot-framework/variables-resources-and-keywords)
5. [5 Run Robot Framework tests on TestingBot](https://testingbot.com/resources/courses/robot-framework/run-robot-framework-on-testingbot)
6. [6 Robot Framework Browser library: Playwright on TestingBot](https://testingbot.com/resources/courses/robot-framework/browser-library-playwright)
7. [7 Data-driven tests with Robot Framework templates](https://testingbot.com/resources/courses/robot-framework/data-driven-tests-with-templates)
8. [8 Tags and parallel test runs with Pabot](https://testingbot.com/resources/courses/robot-framework/tags-and-parallel-runs-with-pabot)
9. [9 Robot Framework reports, CI and test status on TestingBot](https://testingbot.com/resources/courses/robot-framework/reports-ci-and-test-status)
10. [10 Knowledge check](https://testingbot.com/resources/courses/robot-framework/knowledge-check)

[Exit course](https://testingbot.com/resources/courses)

 Chapter 2 of 10 Beginner 5 min read 2 quick checks Updated Nov 2026 

# Install Robot Framework in a Python virtual environment
On this page
1. [Create the project and the virtual environment](https://testingbot.com#create-the-project-and-the-virtual-environment)
2. [Pin the libraries](https://testingbot.com#pin-the-libraries)
3. [Initialise the Browser library](https://testingbot.com#initialise-the-browser-library)
4. [Check the installation](https://testingbot.com#check-the-installation)
5. [Editor support](https://testingbot.com#editor-support)

Robot Framework and its libraries are ordinary Python packages. Install them per project, in a virtual environment, with pinned versions. That is the difference between a suite that runs the same on every laptop and CI agent and one that breaks the day somebody upgrades a library globally.

## Create the project and the virtual environment[#](https://testingbot.com#create-the-project-and-the-virtual-environment)

```bash
mkdir robot-course && cd robot-course
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python --version
```

```
Python 3.13.5
```

Any Python from 3.11 up works for everything in this course. Once the environment is active, `python` and `pip` refer to the copies inside `.venv`, and so will the `robot`, `pabot` and `rfbrowser` commands you are about to install. Add `.venv/` to `.gitignore`.

## Pin the libraries[#](https://testingbot.com#pin-the-libraries)

Create `requirements.txt`:

```
robotframework==7.5.1
robotframework-seleniumlibrary==6.9.0
robotframework-browser==21.0.0
robotframework-pabot==5.2.2
```

and install it:

```bash
pip install -r requirements.txt
```

What each line brings:

- **robotframework** is the runner: the `robot` and `rebot` commands and the standard libraries (BuiltIn, Collections, String, OperatingSystem, DateTime and a few more).
- **robotframework-seleniumlibrary** pulls in Selenium itself, here 4.52.0. Selenium includes **Selenium Manager** , which finds or downloads the right ChromeDriver or GeckoDriver the first time you open a browser. You do not download drivers by hand or put them on the `PATH`.
- **robotframework-browser** is the Playwright-based library. It is a Python package that talks to a Node.js process, so it needs one more step, below.
- **robotframework-pabot** adds the `pabot` command for parallel runs (chapter 7).

Pinning exact versions means an upgrade is a deliberate change you review, not something that happens to you on a Monday morning. When you do upgrade, change the file, reinstall and run the suite.

A colleague's tutorial says to download `chromedriver`, unzip it and add it to the `PATH` before running SeleniumLibrary tests. With the versions above, what do you need to do?

 Follow the tutorial; SeleniumLibrary cannot start Chrome without it Install the `webdriver-manager` package and call it from a keyword Nothing: Selenium Manager, shipped inside Selenium, resolves the driver when the browser opens

Selenium Manager has been part of Selenium since 4.6 and SeleniumLibrary uses it automatically. A driver on the PATH still works, but an outdated one is a common cause of "session not created" errors after a browser update.

## Initialise the Browser library[#](https://testingbot.com#initialise-the-browser-library)

The Browser library ships the Node.js side as source and installs its dependencies with:

```bash
rfbrowser init chromium
```

```
...
[INFO] rfbrowser init completed
```

Without an argument, `rfbrowser init` downloads Chromium, Firefox and WebKit, a few hundred megabytes. Naming a browser installs only that one. For runs that only connect to a remote grid you need no local browser at all: `rfbrowser init --skip-browsers` installs the Node dependencies only.

This step needs Node.js 22, 24 or 26 on the machine. If installing Node is not an option, `pip install "robotframework-browser[bb]"` adds a package with Node bundled; the [Browser library README](https://github.com/MarketSquare/robotframework-browser) explains both routes.

**Every time you upgrade the Browser library, run `rfbrowser clean-node` and `rfbrowser init` again.** The Python package and the Node side must match; a mismatch shows up as confusing errors on the first keyword.

## Check the installation[#](https://testingbot.com#check-the-installation)

```bash
robot --version
```

```
Robot Framework 7.5.1 (Python 3.13.5 on darwin)
```

The `libdoc` tool, which ships with Robot Framework, prints the documentation of any library. It is the fastest way to look up a keyword's exact arguments without leaving the terminal:

```bash
python -m robot.libdoc SeleniumLibrary list Wait
```

```
Get Selenium Implicit Wait
Set Browser Implicit Wait
Set Selenium Implicit Wait
Wait For Condition
Wait For Expected Condition
Wait Until Element Contains
Wait Until Element Does Not Contain
Wait Until Element Is Enabled
Wait Until Element Is Not Visible
Wait Until Element Is Visible
Wait Until Location Contains
...
```

`python -m robot.libdoc SeleniumLibrary SeleniumLibrary.html` writes the full keyword documentation as an HTML page you can keep open while writing tests.

## Editor support[#](https://testingbot.com#editor-support)

Robot Framework files are plain text, so any editor works, but proper support makes a large difference: keyword completion, go-to-definition into resource files and errors for unknown keywords before you run anything. The **RobotCode** extension for VS Code (also available for IntelliJ-based IDEs) uses the same virtual environment as your project; point the editor's Python interpreter at `.venv`.

After `pip install -U robotframework-browser`, every Browser library test fails on its first keyword with an error from the Node.js side. What should you run?

 `rfbrowser clean-node` followed by `rfbrowser init` `pip install playwright` `npx playwright install` in the project folder

The Python package and its Node.js dependencies are versioned together. After an upgrade the old Node side is still installed, so it has to be cleaned and initialised again. The Python `playwright` package is not used by the Browser library at all.

With the tools in place, the next chapter writes and runs the first test.

[Previous · Chapter 1 Robot Framework Tutorial for Beginners](https://testingbot.com/resources/courses/robot-framework) [Next · Chapter 3 Your first Robot Framework test with SeleniumLibrary](https://testingbot.com/resources/courses/robot-framework/first-test-with-seleniumlibrary)

On this page

1. [Create the project and the virtual environment](https://testingbot.com#create-the-project-and-the-virtual-environment)
2. [Pin the libraries](https://testingbot.com#pin-the-libraries)
3. [Initialise the Browser library](https://testingbot.com#initialise-the-browser-library)
4. [Check the installation](https://testingbot.com#check-the-installation)
5. [Editor support](https://testingbot.com#editor-support)

Certification

Earn the free, resume-worthy TestingBot Robot Framework Certification for this course.

[How it works](https://testingbot.com/resources/courses/robot-framework/certification)
