Linux 安装 locust 报错
pip install locust
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-7ygsjb4y/greenlet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-9bfsux_h-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-7ygsjb4y/greenlet/
一、网上找了一些方法(咱也不知道干啥的)就都试了下,就是用不了。
sudo apt-get install libssl-dev libffi-dev python-dev build-essential libxml2-dev libxslt1-dev
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
二、又找了几个方法(测了下,发现还是不能用)
yum -y install zlib*
yum -y install mlocate
yum -y install locust
三、解决方法来了
sudo python3 -m pip install -U pip
pip install -upgrade pip
pip install locust
四、压力测试就可以使用了
locust -f locustfile.py --headless -u 2000 -r 500 -t 1m --html report.html