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