python setup.py не может найти необходимый пакет - PullRequest
0 голосов
/ 25 октября 2018

Я следую настройке elastAlert здесь: https://elastalert.readthedocs.io/en/latest/running_elastalert.html

, когда я запускаю команду python setup.py install --user Я получаю ошибку error: Could not find suitable distribution for Requirement.parse('cffi>=1.11.5')

Поэтому я попытался решить эту проблему, запустивpip install cffi --user Когда я запускаю эту команду, я получаю вывод

Requirement already satisfied: cffi in /usr/local/lib/python2.7/site-packages (1.11.5)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/site-packages (from cffi) (2.19)

, но затем при повторном запуске python setup.py install --user я все равно получаю ту же ошибку:

Installing elastalert-rule-from-kibana script to /Users/Colin/Library/Python/2.7/bin
Installing elastalert-test-rule script to /Users/Colin/Library/Python/2.7/bin

Installed /Users/Colin/Library/Python/2.7/lib/python/site-packages/elastalert-0.1.36-py2.7.egg
Processing dependencies for elastalert==0.1.36
Searching for cffi>=1.11.5
Reading https://pypi.python.org/simple/cffi/
Download error on https://pypi.python.org/simple/cffi/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'cffi' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for cffi>=1.11.5
error: Could not find suitable distribution for Requirement.parse('cffi>=1.11.5')

Почему это не можетпакет будет найден?

python --version = Python 2.7.10
pip --version = pip 18.1 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
...