0

I am using locust package which uses python. I am following this tutorial:

https://docs.locust.io/en/latest/quickstart.html#example-locustfile-py

But when i get to executing this code in command line;

locust locustfile.py

I get this error;

'locust' is not recognized as an internal or external command,
operable program or batch file.

I have succesfully installed locust using pip

Any help apperciated! (sorry for bad English it is not my first language)

loopersfr
  • 11
  • 1
  • 2
  • The response of @user10788336 should be helpful. Also you should consider creating a python virtual environment to isolate your developement: https://realpython.com/python-virtual-environments-a-primer/ – lucrib Aug 14 '19 at 11:10

3 Answers3

2

This could be an issue with setting environment variable - Path for Python37/Scripts location

You may refer to this link with a similar issue:

Not able to install locust on windows

0

After installing locust using pip3 I appended C:/Python37/Scripts to the Path environment variable in windows. Restarted the terminal afterwards and it fixed my problem.

0

On windows, you need to add %APPDATA%\Python\Python311\Scripts to the PATH environment variable