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

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

  • 相关阅读:
    笔记手动排序
    笔记手动分页
    Spring定时任务Quartz配置之手动设置
    java 日期处理
    SQL Case when 的使用方法
    Hibernate八大类HQL查询集合
    Spring定时任务Quartz配置
    各个浏览器显示版本(IE,火狐)
    js转译html标签
    定时备份SQL SERVER的数据库并且把备份文件复制到另外一台服务器
  • 原文地址:https://www.cnblogs.com/hfclszs/p/13690831.html
Copyright © 2011-2022 走看看