Python 版本 3.9.6
httprunner集成了locust 使用locusts命令时出现
***@C02FRJYXMD6M ~ % locusts
Locust is not installed, install first and try again.
install with pip:
$ pip install locust
然后使用pip3安装 报错
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-install-n76yzziy/geventhttpclient_6db9e3b8ae68409dbc876e1e09c6cae8/setup.py'"'"'; __file__='"'"'/private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-install-n76yzziy/geventhttpclient_6db9e3b8ae68409dbc876e1e09c6cae8/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-record-jgib7isr/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/geventhttpclient
cwd: /private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-install-n76yzziy/geventhttpclient_6db9e3b8ae68409dbc876e1e09c6cae8/
Complete output (33 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/useragent.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/header.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/client.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/response.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/url.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/httplib.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
copying src/geventhttpclient/connectionpool.py -> build/lib.macosx-10.9-x86_64-3.9/geventhttpclient
running egg_info
writing src/geventhttpclient.egg-info/PKG-INFO
writing dependency_links to src/geventhttpclient.egg-info/dependency_links.txt
writing requirements to src/geventhttpclient.egg-info/requires.txt
writing top-level names to src/geventhttpclient.egg-info/top_level.txt
adding license file 'LICENSE-MIT' (matched pattern 'LICEN[CS]E*')
reading manifest file 'src/geventhttpclient.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
warning: no files found matching 'CHANGELOG'
writing manifest file 'src/geventhttpclient.egg-info/SOURCES.txt'
running build_ext
building 'geventhttpclient._parser' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/ext
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Iext -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ext/_parser.c -o build/temp.macosx-10.9-x86_64-3.9/ext/_parser.o
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-install-n76yzziy/geventhttpclient_6db9e3b8ae68409dbc876e1e09c6cae8/setup.py'"'"'; __file__='"'"'/private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-install-n76yzziy/geventhttpclient_6db9e3b8ae68409dbc876e1e09c6cae8/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/nd/m4wjnl0j3w50xcllrgx3k_g00000gy/T/pip-record-jgib7isr/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/geventhttpclient Check the logs for full command output.
原因不明,通过https://blog.csdn.net/weixin_42071869/article/details/108056259方法解决