zoukankan      html  css  js  c++  java
  • Locust安装失败:Running setup.py install for geventhttpclient ... error

    最近想学习Locust性能测试,没想到卡在了安装上。
    根据官方指导文档,执行pip install locust,报错信息如下所示:

    Downloading MarkupSafe-1.1.1-cp36-cp36m-win32.whl (15 kB)
    Using legacy setup.py install for ConfigArgParse, since package 'wheel' is not installed.
    Using legacy setup.py install for geventhttpclient, since package 'wheel' is not installed.
    Using legacy setup.py install for Flask-BasicAuth, since package 'wheel' is not installed.
    Installing collected packages: ConfigArgParse, psutil, pyzmq, zope.interface, greenlet, pycparser, cffi, zope.event, gevent, msgpack, MarkupSafe, Jinja2, click, Werkzeug, itsdangerous, flask, geventhttpclient, Flask-BasicAuth, locust
        Running setup.py install for ConfigArgParse ... done
        Running setup.py install for geventhttpclient ... error
        ERROR: Command errored out with exit status 1:
         command: 'e:program files (x86)python3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\DT-040~1\AppData\Local\Temp\pip-install-a47vuh1v\geventhttpclient\setup.py'"'"'; __file__='"'"'C:\Users\DT-040~1\AppData\Local\Temp\pip-install-a47vuh1v\geventhttpclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersDT-040~1AppDataLocalTemppip-record-md_9zmwqinstall-record.txt' --single-version-externally-managed --compile --install-headers 'e:program files (x86)python3Includegeventhttpclient'
             cwd: C:UsersDT-040~1AppDataLocalTemppip-install-a47vuh1vgeventhttpclient
        Complete output (28 lines):
        running install
        running build
        running build_py
        creating build
        creating buildlib.win32-3.6
        creating buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclientclient.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclientconnectionpool.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclientheader.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclienthttplib.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclient
    esponse.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclienturl.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclientuseragent.py -> buildlib.win32-3.6geventhttpclient
        copying srcgeventhttpclient\__init__.py -> buildlib.win32-3.6geventhttpclient
        running egg_info
        writing srcgeventhttpclient.egg-infoPKG-INFO
        writing dependency_links to srcgeventhttpclient.egg-infodependency_links.txt
        writing requirements to srcgeventhttpclient.egg-info
    equires.txt
        writing top-level names to srcgeventhttpclient.egg-info	op_level.txt
        reading manifest file 'srcgeventhttpclient.egg-infoSOURCES.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 'srcgeventhttpclient.egg-infoSOURCES.txt'
        running build_ext
        building 'geventhttpclient._parser' extension
        error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
        ----------------------------------------
    ERROR: Command errored out with exit status 1: 'e:program files (x86)python3python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\DT-040~1\AppData\Local\Temp\pip-install-a47vuh1v\geventhttpclient\setup.py'"'"'; __file__='"'"'C:\Users\DT-040~1\AppData\Local\Temp\pip-install-a47vuh1v\geventhttpclient\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:UsersDT-040~1AppDataLocalTemppip-record-md_9zmwqinstall-record.txt' --single-version-externally-managed --compile --install-headers 'e:program files (x86)python3Includegeventhttpclient' Check the logs for full command output.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41

    解决方法,我认为有两个:
    一是、根据提示去安装Microsoft Visual C++ 14.0,但是这个方法消耗的时间和空间都非常的高,大家可以量力而行;
    第二种方法就是安装最新(发布前)的locust,

    pip install -U setuptools
    pip install -U --pre locustio
    
    • 1
    • 2

    安装成功
    在这里插入图片描述

  • 相关阅读:
    科研第四天
    科研第三天
    科研的第一天
    django_1.6.8学习笔记——创建project
    第一个project,累哭的第一个app
    前记
    线性表——单链表小结(腾讯面试题)(4)
    一个考试模拟界面——先记录一下下ui上的东东
    源码0602-05-掌握-多值参数
    源码0602-03-掌握-XML解析-NSXMLParser
  • 原文地址:https://www.cnblogs.com/hfclszs/p/13690831.html
Copyright © 2011-2022 走看看