0

I have installed python 2.7.5 and python 2.7.16. I want my robot framework to point to python 2.7.16.

Present it is as shown: Robot Framework 3.0.4 (Python 2.7.5 on linux2) Any help ?

  • 1
    I could be wrong but my understanding is that robot framework is installed within site-packages of a Python version. Perhaps this can help, although it's very old question/answer :S https://stackoverflow.com/questions/10919569/install-a-module-using-pip-for-specific-python-version (I think the one below the accepted answer with 200+ votes sounds better) – Matthew King Nov 18 '20 at 16:40

1 Answers1

1

This is more a generic Linux question than a specific Robot Framework.

There are several solutions:

  • Uninstall Robot Framework from the version you won't use (and probably re-install in the Python you need)
  • Edit the robot script to point to the correct Python
  • Delete the existing robot script and ln -s to the correct robot
  • Always use the correct Python to install/uninstall libraries or tools. For example: /usr/local/bin/python2.7.16 -m pip install robotframework
  • Change or create a robot script to use correct Python, for example: /usr/local/bin/python2.7.16 -m robot $*
  • Change the PATH variable so that the correct Python appears before the old one if installed in different directories, for example: set PATH=/usr/local/bin:$PATH
Helio
  • 3,322
  • 1
  • 14
  • 23
  • My system has pybot which is pointing to old version of python. Whereas robot is pointing to current version. Can you please help how to get rid of this. (virtualenv) root @ ~ - [] # robot --version Robot Framework 3.0.4 (Python 2.7.18 on linux2) (virtualenv) root @ ~ - [] # pybot --version Robot Framework 3.2.2 (Python 2.7.5 on linux2) – Venkatarao Dadi Nov 21 '20 at 04:27
  • You probably swapped the versions on those commands, because there is no `pybot`on Robot Framework 3.2.2. If you only need the newest version, 3.2.2, then you should uninstall the old one. The best is to uninstall both and then install 3.2.2 in the newest python. You should edit your question to make clear what you need. – Helio Nov 22 '20 at 02:50