Locust Installation error on Ubuntu 16.04 and Debian Stretch
See original GitHub issueDescribe the bug
As far as I understand, Locust package has moved from locustio to locust. I was developing an Ansible role to install locust on a few of Debian family operating systems such as the following:
- Ubuntu 20.04
- Ubuntu 18.04
- Ubuntu 16.04
- Debian Buster
- Debian Stretch
Using python3’s pip, locust is successfully installed on Ubuntu 20.04, Ubuntu 18.04 and Debian Buster. However, it attempts to install locustio along with locust and errors out on Ubuntu 16.04 and Debian Stretch.
Expected behavior
Clean installation on Ubuntu 16.04 and Debian Stretch.
Actual behavior
Outputs below error (running locally within a docker container of ubuntu 16.04):
$ python3 -m pip install locust
Collecting locust
Downloading locust-0.0.tar.gz (833 bytes)
Collecting locustio
Downloading locustio-0.999.tar.gz (267 kB)
|################################| 267 kB 2.5 MB/s
Building wheels for collected packages: locust, locustio
Building wheel for locust (setup.py) ... done
Created wheel for locust: filename=locust-0.0-py3-none-any.whl size=1042 sha256=f16b8e06507985e6c7922338e7ab884a279416f6ba98370cfb6e7931d3b41ffe
Stored in directory: /root/.cache/pip/wheels/fa/78/82/0d758e038e682fad3d3ece52a4724f9cb2822693ab6f504589
Building wheel for locustio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v2zs_a7d/locustio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v2zs_a7d/locustio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-pyaprmw9
cwd: /tmp/pip-install-v2zs_a7d/locustio/
Complete output (89 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/locust
copying locust/exception.py -> build/lib/locust
copying locust/runners.py -> build/lib/locust
copying locust/__init__.py -> build/lib/locust
copying locust/main.py -> build/lib/locust
copying locust/__main__.py -> build/lib/locust
copying locust/log.py -> build/lib/locust
copying locust/stats.py -> build/lib/locust
copying locust/event.py -> build/lib/locust
copying locust/argument_parser.py -> build/lib/locust
copying locust/env.py -> build/lib/locust
copying locust/clients.py -> build/lib/locust
copying locust/web.py -> build/lib/locust
creating build/lib/locust/test
copying locust/test/test_client.py -> build/lib/locust/test
copying locust/test/mock_locustfile.py -> build/lib/locust/test
copying locust/test/test_runners.py -> build/lib/locust/test
copying locust/test/test_fasthttp.py -> build/lib/locust/test
copying locust/test/test_wait_time.py -> build/lib/locust/test
copying locust/test/test_parser.py -> build/lib/locust/test
copying locust/test/__init__.py -> build/lib/locust/test
copying locust/test/testcases.py -> build/lib/locust/test
copying locust/test/test_zmqrpc.py -> build/lib/locust/test
copying locust/test/test_old_wait_api.py -> build/lib/locust/test
copying locust/test/test_web.py -> build/lib/locust/test
copying locust/test/mock_logging.py -> build/lib/locust/test
copying locust/test/test_util.py -> build/lib/locust/test
copying locust/test/test_taskratio.py -> build/lib/locust/test
copying locust/test/test_stats.py -> build/lib/locust/test
copying locust/test/test_log.py -> build/lib/locust/test
copying locust/test/test_tags.py -> build/lib/locust/test
copying locust/test/test_locust_class.py -> build/lib/locust/test
copying locust/test/test_sequential_taskset.py -> build/lib/locust/test
copying locust/test/test_main.py -> build/lib/locust/test
copying locust/test/util.py -> build/lib/locust/test
creating build/lib/locust/rpc
copying locust/rpc/protocol.py -> build/lib/locust/rpc
copying locust/rpc/zmqrpc.py -> build/lib/locust/rpc
copying locust/rpc/__init__.py -> build/lib/locust/rpc
creating build/lib/locust/util
copying locust/util/deprecation.py -> build/lib/locust/util
copying locust/util/exception_handler.py -> build/lib/locust/util
copying locust/util/cache.py -> build/lib/locust/util
copying locust/util/rounding.py -> build/lib/locust/util
copying locust/util/__init__.py -> build/lib/locust/util
copying locust/util/timespan.py -> build/lib/locust/util
creating build/lib/locust/user
copying locust/user/inspectuser.py -> build/lib/locust/user
copying locust/user/__init__.py -> build/lib/locust/user
copying locust/user/task.py -> build/lib/locust/user
copying locust/user/users.py -> build/lib/locust/user
copying locust/user/sequential_taskset.py -> build/lib/locust/user
copying locust/user/wait_time.py -> build/lib/locust/user
creating build/lib/locust/contrib
copying locust/contrib/fasthttp.py -> build/lib/locust/contrib
copying locust/contrib/__init__.py -> build/lib/locust/contrib
running egg_info
writing top-level names to locustio.egg-info/top_level.txt
writing locustio.egg-info/PKG-INFO
writing dependency_links to locustio.egg-info/dependency_links.txt
writing entry points to locustio.egg-info/entry_points.txt
reading manifest file 'locustio.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'locustio.egg-info/SOURCES.txt'
creating build/lib/locust/static
copying locust/static/chart.js -> build/lib/locust/static
copying locust/static/echarts.common.min.js -> build/lib/locust/static
copying locust/static/jquery-1.11.3.min.js -> build/lib/locust/static
copying locust/static/jquery.jqote2.min.js -> build/lib/locust/static
copying locust/static/jquery.tools.min.js -> build/lib/locust/static
copying locust/static/locust.js -> build/lib/locust/static
copying locust/static/style.css -> build/lib/locust/static
copying locust/static/vintage.js -> build/lib/locust/static
creating build/lib/locust/static/img
copying locust/static/img/favicon.ico -> build/lib/locust/static/img
copying locust/static/img/logo.png -> build/lib/locust/static/img
copying locust/static/img/top_bg.png -> build/lib/locust/static/img
creating build/lib/locust/templates
copying locust/templates/index.html -> build/lib/locust/templates
installing to build/bdist.linux-x86_64/wheel
running install
**** Locust package has moved from 'locustio' to 'locust'. Please update your reference (or pin your version to 0.14.6 if you dont want to update to 1.0) ****
----------------------------------------
ERROR: Failed building wheel for locustio
Running setup.py clean for locustio
Successfully built locust
Failed to build locustio
Installing collected packages: locustio, locust
Running setup.py install for locustio ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v2zs_a7d/locustio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v2zs_a7d/locustio/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-record-bzfj941a/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/locustio
cwd: /tmp/pip-install-v2zs_a7d/locustio/
Complete output (4 lines):
running install
**** Locust package has moved from 'locustio' to 'locust'. Please update your reference (or pin your version to 0.14.6 if you dont want to update to 1.0) ****
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v2zs_a7d/locustio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v2zs_a7d/locustio/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-record-bzfj941a/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.5/locustio Check the logs for full command output.
Steps to reproduce
Install locust on an ubuntu 16.04 or debian stretch docker image.
OR try following:
docker run -it darkwizard242/ansible:ubuntu-16.04 /bin/bash -c 'python3 -m pip install locust'
docker run -it darkwizard242/ansible:debian-stretch /bin/bash -c 'python3 -m pip install locust'
Environment
- OS: Ubuntu 16.04 & Debian Stretch
- Python version: 3.5.2 (ubuntu 16.04) and 3.5.3 (debian-stretch)
- Locust version: Default (as failure at installation process with certain operating systems)
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (1 by maintainers)
Top Results From Across the Web
Installation — Locust 2.14.0 documentation
Installation ¶. Install Python (3.7 or later). Install the package (check the wiki if the installation fails).
Read more >Locust installation: psutil compilation failed with exit status 1 ...
I am installing locust using command pip3 install locust . I am faced with a series of errors which I am unable to...
Read more >Failed to install Locustio on Ubuntu 18.04
Try python3 -m locust.main ... and see if that helps at all. It worked for me. Share.
Read more >locust - PyPI
Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code,...
Read more >Bug #1817358 “Ubuntu 16.04 netboot installation failed ...
I try to install Ubuntu 16.04 on a Citrix Xenserver. I use http://de.archive.ubuntu.com/ubuntu/ as ... Changed in debian-installer (Ubuntu):.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@heyman Can you delete the locust 0.0 package? I dont have permissions…
Once it is removed people should at least get a more reasonable error message. The reason for the strange error is that
locust
0.0 (from 2018) states that it supports 3.5, but it just references locustio. “real” packages released aslocust
(starting with 1.0) dont support 3.5, so you get the only one that does.A comment for others reading along: I received this error using python:3.9.0-slim-buster today and worked around it by using python:3.8.10-slim-buster in my Docker image instead, which worked.