-
Notifications
You must be signed in to change notification settings - Fork 3k
Installation
While Locust itself is a pure Python package, it has some dependencies (e.g. gevent and geventhttpclient) that are compiled from C code. Pretty much all common platforms have binary packages on PyPi, but sometimes there is a new release that doesnt, or you are running on some exotic platform. You have two options:
- (on macos) Install xcode:
xcode-select --install
- Use
pip install --prefer-binary locust
to select a pre-compiled version of packages even if there is a more recent version available as source. - Try googling the error message for the specific package that failed (not Locust), ensure you have the appropriate build tools installed etc.
When running pip, did you get a warning saying
The script locust is installed in '...' which is not on PATH
? Add that directory to your PATH environment variable.
Every User/HTTP connection from Locust opens a new file (technically a file descriptor). Many operating systems by default set a low limit for the maximum number of files that can be open at the same time.
Locust will try to adjust this automatically for you, but in a lot of cases your operating system will not allow it (in which case you will get a warning in the log). Instead you will have to do it manually. How to do this depends on your operating system, but you might find some useful information here: https://www.tecmint.com/increase-set-open-file-limits-in-linux/ and practical examples https://www.ibm.com/support/knowledgecenter/SS8NLW_11.0.2/com.ibm.discovery.es.in.doc/iiysiulimits.html
For those who want to deploy a local environment, follow the steps below.