lucrib / locust_influx

Send information about locust requests to influxdb.
Apache License 2.0
19 stars 13 forks source link

installing package fix #4

Closed Inokenty90 closed 4 years ago

Inokenty90 commented 4 years ago

When trying to install from pip I got this:

pip install locust_influx
Collecting locust_influx
  Using cached https://files.pythonhosted.org/packages/cf/3b/a358fef5d04bfd5819e7b58df0cb12916276427a393d6688f36d54e91e8e/locust_influx-0.2.1.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /home/inokenty/.virtualenvs/temp_influx/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bpv4zxmp/locust-influx/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bpv4zxmp/locust-influx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-bpv4zxmp/locust-influx/pip-egg-info
         cwd: /tmp/pip-install-bpv4zxmp/locust-influx/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-bpv4zxmp/locust-influx/setup.py", line 3, in <module>
        from locust_influx.__version__ import __version__
      File "/tmp/pip-install-bpv4zxmp/locust-influx/locust_influx/__init__.py", line 7, in <module>
        import gevent
    ModuleNotFoundError: No module named 'gevent'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

https://packaging.python.org/guides/single-sourcing-package-version/ Although this technique is common, beware that it will fail if sample/init.py imports packages from install_requires dependencies, which will very likely not be installed yet when setup.py is run.

lucrib commented 4 years ago

Thanks again for you contribution @Inokenty90 !