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 )
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!
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?
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