'Not able to install Locust on Mac

I am installing Locust on my Mac with the following command (as per the docs https://docs.locust.io/en/2.8.1/installation.html):

pip install locust

and getting following error:

➜  Locust pip3 install locust
Collecting locust
  Using cached locust-2.8.2-py3-none-any.whl (803 kB)
Collecting requests>=2.23.0
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting ConfigArgParse>=1.0
  Using cached ConfigArgParse-1.5.3-py3-none-any.whl (20 kB)
Collecting typing-extensions>=3.7.4.3
  Using cached typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting psutil>=5.6.7
  Using cached psutil-5.9.0.tar.gz (478 kB)
  Preparing metadata (setup.py) ... done
Collecting flask>=2.0.0
  Using cached Flask-2.0.3-py3-none-any.whl (95 kB)
Collecting Flask-Cors>=3.0.10
  Using cached Flask_Cors-3.0.10-py2.py3-none-any.whl (14 kB)
Collecting gevent>=20.9.0
  Using cached gevent-21.12.0.tar.gz (6.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

Python version Python 3.8.6

Any idea how I can solve this? Thank you for any help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source