'Python Locust 'locust' is not recognized as an internal or external command, operable program or batch file
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)
Solution 1:[1]
This could be an issue with setting environment variable - Path for Python37/Scripts location
You may refer to this link with a similar issue:
Solution 2:[2]
If you're using python3, you may need to install locust with pip3 install locust.
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anuradha Agarwal |
| Solution 2 | user10788336 |
| Solution 3 | Daniel Contreras |
