pip install awscli failing in Software Collections Python 2.7 with "AttributeError: 'NoneType' object has no attribute 'digest_size'"
Issue
- Receiving the following traceback when attempting to install
awscliwithpipin Python 2.7 environment
# pip install awscli
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting awscli
Unsupported hash name md5 for package https://pypi.python.org/packages/9a/6c/a4e81e1eec2c22c8421a849ed6287c839068052251c32c0501141f789f30/awscli-1.11.23-py2.py3-none-any.whl#md5=c047d991207719873badd9c05fd6de82 (from https://pypi.python.org/simple/awscli/)
Using cached awscli-1.11.23-py2.py3-none-any.whl
Exception:
Traceback (most recent call last):
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/commands/install.py", line 301, in run
wb.build(autobuilding=True)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/wheel.py", line 707, in build
self.requirement_set.prepare_files(self.finder)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 491, in _prepare_file
session=self.session)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/download.py", line 825, in unpack_url
session,
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/download.py", line 673, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/download.py", line 886, in _download_http_url
_download_url(resp, link, content_file)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/download.py", line 626, in _download_url
_check_hash(download_hash, link)
File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/pip/download.py", line 489, in _check_hash
if download_hash.digest_size != hashlib.new(link.hash_name).digest_size:
AttributeError: 'NoneType' object has no attribute 'digest_size'
- Issue persists when
pipis updated as suggested
Environment
- Red Hat Enterprise Linux 7
- Red Hat Software Collections
- python27-1.1-25.el6.x86_64
- pip Version 7.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
