6

I installed Python2.7.12 and then installed robotframework using the below command

python -m pip install robotframework

it showed the result as installed successfully.

When i have given the command pybot --version it showed as

'pybot' is not recognized as an internal or external command

In environment variables python home set as C:\Python27 and C:\Python27\Scripts are set.

Please any can help me what can be reason for error

Thanks Sarada

Sarada Akurathi
  • 1,164
  • 7
  • 28
  • 56
  • 1
    Add python executable path to the Windows PATH variable. http://stackoverflow.com/questions/7054424/python-not-recognised-as-a-command – JohnMayer Nov 18 '16 at 10:17
  • Does `pybot.bat` works? – Łukasz Rogalski Nov 18 '16 at 10:22
  • Thanks @JohnMayer, i already added python executable path to windows path variable, but still not worked. one of the solution in that question. `c:\python27\tools\scripts\win_add2path.py` solved the issue – Sarada Akurathi Nov 18 '16 at 10:31
  • @JohnMayer, pybot command is working only in the directory where python is installed i.e.,`c:\python27`; if it is outside then getting the same error as above. can you please help on this – Sarada Akurathi Nov 18 '16 at 11:25
  • 1
    Do you see this path in your machine? C:\Python27\Lib\site-packages\robot, this is the place where it gets called from. Also check if you have multiple python versions installed and to which is robot linked to. Make sure to add that one under windows PATH – Waman Nov 21 '16 at 10:15
  • Thanks @Waman, it worked – Sarada Akurathi Nov 21 '16 at 12:21

6 Answers6

5

Need to setup following in the environment variable PATH

C:\Python27\Lib\site-packages\robot;
C:\Python27;
C:\Python27\bin;

Thanks for your help JohnMayer and Waman.

It is working fine now

Sarada Akurathi
  • 1,164
  • 7
  • 28
  • 56
2

Following steps worked for me:

  1. Add C:\Python27\Scripts to the path environment variable
  2. Create pybot.bat file inside above location and put robot %* this content.
1

If for some reason there is no pybot.bat file, then create a pybot.bat file. Inside this file add robot %* and place the file in a directory reached from %PATH - https://github.com/robotframework/RIDE/issues/1468#issuecomment-366524912

1

For python 3, use robot instead of pybot

All thanks to @saurav

Viktor Ilienko
  • 817
  • 8
  • 15
0

I added

C:\Python27\Scripts 

along with below values in System Variables' PATH variable.

C:\Python27\Lib\site-packages\robot;
C:\Python27;
C:\Python27\bin;

Only then it worked.

Also every time you update environment variables you need to relaunch your cmd/powershell window or reload environment variables for changes to reflect.

girkot1307
  • 39
  • 5
0

setup following in the environment variable PATH C:\Python27; C:\Python27\Scripts C:\Python27\Lib\site-packages\robot; and also browser.exe path

Worked for me.