简体   繁体   中英

Installing locust.io error (failed with exit status 2)

I tried both commands:

1- pip install locustio
2- easy_install locustio

Both gave the same result as shown bellow:


Searching for locustio Best match: locustio 0.8.1 Processing locustio-0.8.1-
py3.7.egg locustio 0.8.1 is already the active version in easy-install.pth 
Installing locust-script.py script to c:\python37\Scripts Installing 
locust.exe script to c:\python37\Scripts Installing locust.exe.manifest script 
to c:\python37\Scripts Using c:\python37\lib\site-packages\locustio-0.8.1-
py3.7.egg Processing dependencies for locustio Searching for gevent>=1.2.2 
Reading https://pypi.python.org/simple/gevent/ c:\python37\lib\site-packages
\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG ' is 
unset, Python ABI tag may be incorrect warn=(impl == 'cp')): c:\python37
\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config 
variable 'WITH_PYM ALLOC' is unset, Python ABI tag may be incorrect warn=(impl
 == 'cp')): Downloading https://files.pythonhosted.org/packages/e6/0a
/fc345c6e6161f84484870dbcaa58e427c10bd9bdcd 08a69bed3d6b398bf1/gevent-
1.3.5.tar.gz#sha256=7f15861f3cc92f49663ca88c4774d26d8044783a65fbc28071a2bd 
1c7bf36ff0 Best match: gevent 1.3.5 Processing gevent-1.3.5.tar.gz Writing 
C:\Users\work\AppData\Local\Temp\easy_install-rysrp8s8\gevent-1.3.5\setup.cfg 
Running gevent-1.3.5\setup.py -q bdist_egg --dist-dir C:\Users\work\AppData
\Local\Temp\easy_install- rysrp8s8\gevent-1.3.5\egg-dist-tmp-q9s0ninv warning:
 no files found matching 'changelog.rst' warning: no files found matching 
'Makefile.ext' warning: no files found matching 'known_failures.py' warning: 
no files found matching '.pep8' no previously-included directories found 
matching '_pycache_' warning: no previously-included files matching '.so' 
found anywhere in distribution warning: no previously-included files matching 
'.o' found anywhere in distribution warning: no previously-included files
 matching '.lo' found anywhere in distribution warning: no previously-included 
files matching '.la' found anywhere in distribution warning: no previously-
included files matching 'config.log' found anywhere in distribution warning: 
no previously-included files matching 'config.status' found anywhere in 
distribution no previously-included directories found matching 'doc_build' 
warning: no previously-included files matching '.pyc' found anywhere in 
distribution warning: no previously-included files matching '.coverage' found 
under directory 'src\greentest' no previously-included directories found 
matching 'src\greentest\htmlcov' warning: no previously-included files 
matching 'stamp-h?' found under directory 'deps\c-ares' warning: no 
previously-included files matching 'ares_build.h.orig' found under directory 
'deps\c-are s' no previously-included directories found matching 
'deps\libev.deps' no previously-included directories found matching 
'deps\libuv.deps' warning: no previously-included files matching 'Makefile' 
found under directory 'deps\libev' warning: no previously-included files 
matching 'libtool' found under directory 'deps\libev' warning: no previously-
included files matching 'stamp-h?' found under directory 'deps\libev' warning: 
no previously-included files matching 'config.h' found under directory 
'deps\libev' warning: no previously-included files matching '_corecffi.c'
 found under directory 'src\gevent' warning: no previously-included files found matching 'Makefile' warning: no previously-included files found matching
 'configure-output' warning: no files found matching 'Makefile.ext' warning:
 no previously-included files matching '.deps' found under directory 'deps\c-
ares' warning: no previously-included files matching '.libs' found under 
directory 'deps\c-ares' warning: no previously-included files matching '.deps'
 found under directory 'deps\libuv' warning: no previously-included files 
matching '.libs' found under directory 'deps\libuv' warning: no previously-
included files matching '.deps' found under directory 'deps\libev' warning: no 
previously-included files matching '.libs' found under directory 'deps\libev'
 cl : Command line error D8003 : missing source filename error: Setup script 
exited with error: command 'C:\Program Files\Microsoft Visual Studio 14.0\VC
 \BIN\cl.exe' failed with exit status 2

from the Locust docs:

On Windows, running pip install locustio might fail depedning on if you have a build environment set up correctly. In that case, the easiest way to get Locust running on windows is to first install the pre built binary package for pyzmq (and possibly for gevent and greenlet as well) .

You can find an unofficial collection of pre built python packages for windows here: http://www.lfd.uci.edu/~gohlke/pythonlibs/

When you've downloaded a pre-built .whl file, you can install it with:

 pip install pyzmq‑16.0.2‑cp36‑cp36m‑win32.whl 

Once you've done that you should be able to just: pip install locustio

Its possible that you have a version of python installed that is not supported by locustio. As of now, locustio is supported by Python 2.7, 3.4, 3.5, and 3.6. If you have a newer version of python (for example, python 3.7), the installation will fail.

I got similar problem but with exit code 1 when running pip install locustio .

I can confirm that fail on python 3.7.0, but it works ok on python 3.6.7 with no errors, so it's just a version compatibility issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM