python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 602 forks source link

ERROR: diamond requires Python '==2.7' but the running Python is 2.7.16 #731

Closed SiqingYu closed 4 years ago

SiqingYu commented 5 years ago

Environment: Ubuntu 19.04

I am trying to set up the environment as instructed by The Hitchhiker's Guide to Python:

$ git clone https://github.com/python-diamond/Diamond.git
$ virtualenv -p python2 venv  # It's not Python 3 compatible yet...
$ source venv/bin/activate
(venv)$ cd Diamond/
(venv)$ pip install --editable .

Then pip throws out an error:

ERROR: diamond requires Python '==2.7' but the running Python is 2.7.16
dienhoa commented 4 years ago

Hi. I'm getting the same error as you while following the book.

The problem seems can be fixed by editing in setup.py at setup()

from python_requires='==2.7' to your specific version of python (in your case 2.7.16) python_requires='==2.7.16'

To run the test I also need to install: pip install redis

Hope that helps,