Using RIDE in virtualenv or PyEnv

Continuing the discussion from No "open browser" keyword in seleniumlibrary:

I am creating this topic, for us to find the best way to run RIDE from virtualenv, especially PyEnv.

Usually my approach on any Operating System, is to install RIDE with administration rights (root) just like any other application. I don’t have experience with PyEnv (but will study it). I only have used virtualenv with success. These are the possibilities:

  • Install all dependencies and RIDE in base system, use all other RobotFramework tools and libraries from virtualenv:
    ** We need to setup PYTHONPATH or the RIDE helper script to have virtualenv python finding robot & friends from there.
  • Install all dependencies and RIDE in the virtualenv.
    ** Assuming that PYTHONPATH or the RIDE helper will only have access to this virtualenv, most problematic issue is the wxPython installation.

Similar to this is using RIDE from docker (this is in my mental TODO list :slight_smile: )

Next steps for me, is to see how to get RIDE running under PyEnv.

@HelioGuilherme66 please be aware that pyenv is no virtual python environmen!

pyenv allows you to build and have multiple versions of python on your computer.

❯ pyenv versions
 system
* 3.8.0 (set by /Users/rener/.pyenv/version)
 3.8.2
 3.9.0a5

then you can select with pyenv global which python is connected to the python command and is in path.

❯ pyenv global 3.8.2
❯ pyenv versions
  system
  3.8.0
* 3.8.2 (set by /Users/rener/.pyenv/version)
  3.9.0a5

With pyenv local you can also define a python version that is only for this specified folder.
Also you can install new python verisons by just do pyenv install 3.7.4

pyenv does download the sources and build it locally so it is not an installation with the python installer.
Due to that, also tkinter has some issues with pyenv. the home bew must be configured to include it in the build.

But don’t make too much work regarding that issue!

I thought I’d try RIDE today on Windows from within a pipenv shell and it works perfectly :+1:

2 Likes

I assume you are using the development version of RIDE, v2.1.dev33.

> ride --version
v2.0.8.1
1 Like

I just have problem running Ride under Pyenv and Pipenv on linx os (Rasbian on pi4B)

this following setting I have:

I created Project Folder under /Documents/project/rf_demo
install python 3.11.9 with pyenv .

Set my project Folder to used local python 3.11.9:
cd /Documents/project/rf_demo
pyenv local 3.11.9

check current python version on path: pyenv version
~/Documents/projects/demo_rf $ pyenv version
3.11.9 (set by PYENV_VERSION environment variable)

install pipenv on this Virtualenv: python3 -m pip install - - user pipenv

pipenv graph
robotframework==7.2.2
robotframework-ride==2.1.2
├── packaging
├── psutil
├── Pygments
├── Pypubsub
├── requests
│ ├── certifi
│ ├── charset-normalizer
│ ├── idna
│ └── urllib3
└── wxPython
├── numpy
└── six

start virtualenv in shell mode: python3 -m pipenv shell
check location from ride.py script : which ride.py
demo_rf) andie@raspi-dev01:~/Documents/projects/demo_rf $ which ride.py
/home//.local/share/virtualenvs/demo_rf-So6xknPA/bin/ride.py

now if i try to run ride.py:
(demo_rf) andie@raspi-dev01:~/Documents/projects/demo_rf $ python3 -m ride.py

and got these Following error message:
/home/andie/.local/share/virtualenvs/demo_rf-So6xknPA/bin/python3: Error while finding module specification for ‘ride.py’ (ModuleNotFoundError: No module named ‘ride’). Try using ‘ride’ instead of ‘ride.py’ as the module name.

next try:
(demo_rf) andie@raspi-dev01:~/Documents/projects/demo_rf $ python3 -m ride
/home/andie/.local/share/virtualenvs/demo_rf-So6xknPA/bin/python3: No module named ride

do you have any idea whats I’m miss or doing wrong?

Thanks and best Regards from Germany
Andie

The correct way to start RIDE, should be:

  • python3 -m robotide
  • python3 -m robotide.__init__

You should try first the shell script:

  • ride

looks like i miss some os package:
python3 -m robotide
Traceback (most recent call last):
File “”, line 189, in _run_module_as_main
File “”, line 148, in _get_module_details
File “”, line 112, in _get_module_details
File “/home/andie/.local/share/virtualenvs/demo_rf-So6xknPA/lib/python3.11/site-packages/robotide/init.py”, line 46, in
import wx
File “/home/andie/.local/share/virtualenvs/demo_rf-So6xknPA/lib/python3.11/site-packages/wx/init.py”, line 17, in
from wx.core import *
File “/home/andie/.local/share/virtualenvs/demo_rf-So6xknPA/lib/python3.11/site-packages/wx/core.py”, line 12, in
from ._core import *
ImportError: libwx_gtk3u_core-3.2.so.0: cannot open shared object file: No such file or directory

I know that one user managed to run RIDE in a RaspBerry Pi (but not in virtualenv).

You may try to see in the FAQ, the instructions on how to install on Ubuntu, a bit old but may help.

You should debug wxPython, for example with:

$ python3
> import wx
> print(wx.VERSION)

Thanks for you infos , I have to build wxPython for my PI4 OS version from source, would be a long day for me :wink:

1 Like

After Doing some Try and Error, i manage to find out OS Package needed for Rasbian Bookworm for wyPython.

I need to add these following Package:

sudo apt install python3.11-dev libgtk2.0-dev libgtk-3-dev

sudo apt install dpkg-dev build-essential libjpeg-dev libtiff-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libgstreamer-plugins-base1.0-dev libnotify-dev freeglut3-dev libwebkitgtk-6.0-dev libghc-gtk3-dev libwxgtk3.2-dev

start virtualenv ;
python3 -m pipenv shell

I cheek the Installation:
(demo_rf) andie@raspi-dev01:~/Documents/projects/demo_rf $ python3

Python 3.11.9 (main, Feb 19 2025, 07:54:58) [GCC 12.2.0] on linux

Type “help”, “copyright”, “credits” or “license” for more information.

import wx

print(wx.VERSION)

(4, 2, 2, ‘’)

Start ride:
(demo_rf) andie@raspi-dev01:~/Documents/projects/demo_rf $ python3 -m robotide

1 Like