Locust installation and run-up issues on Mac

239 Views Asked by At

I am trying my hand at distributed load testing using Locust. My Mac Sonoma 14.0 is facing issues while installing Locust.

Details:

  1. I already have Python 3.8.6 installed in my system
  2. I tried installing Locust a year back, it was version 2.14, which ran stably, until it started running into issues, at which point I've uninstalled Locust from Pip and reinstalled it from same platform this time using the current stable version.

pip3 install locust==2.18.0

pip show locust response also doesn't seem to display all the required result as it should've. Is it because of an underlying package version conflict or could it be a different issue altogether?

enter image description here

2

There are 2 best solutions below

2
Dmitri T On

It's hard to say exactly what is wrong, most probably it's a matter of your operating system paths.

In general it's recommended to use virtual environments instead of installing packages globally and when you activate the virtual environment and install locust via pip it should be available

python3 -m venv locust && \
cd locust && \
source bin/activate && \
pip3 install -q locust && \
locust --version

enter image description here

There is also a Homebrew formula so you should be able to get it as

brew install locust

More information: What Is Locust Load Testing?

0
Puja Bhattacharya On

Upon further investigation, these are my findings. This would help someone who is trying to setup locust in similar system config as mine(mentioned in above question).

There seems to be an issue with Sonoma version and Locust stable version whose underlying packages. A partial solution is right now to do the installation via home brew currently till a solution to the pip bug is pushed in managing the underlying conflict and dependency right now..

Installation in python environment really doesn't give any solution, as the issue is in pip not having supported dependency packages for Sonoma os.

Restriction: With this solution, locust can only be run in headless mode for now. The port 8089, from my system has nothing running on it, still doesn't support the command to open the flask interface which comes as a default package with locust, when trying to reach localhost:8089

If someone is interested in knowing this current open bug and troubleshooting struggles, you can refer it here on my blog.

It additionally has the link to the github issue too.