Python package Requests 2.18.4-r0 failure: pkg_resources.DistributionNotFound
When installing py2-sphinx
and py2-setuptools
and execute
/usr/bin/sphinx-build-2
I’m running into this error:
<code class="python">
Traceback (most recent call last):
File "/usr/bin/sphinx-build-2", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3086, in <module>
@_call_aside
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3099, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 576, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 778, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'idna<2.7,>=2.5' distribution was not found and is required by requests
</code>
The problem is in package py-requests-2.18.4-r0
that is too old for
the currently installable py-idna-2.7-r0
package. Python Requests
2.18.4 needs ‘idna<2.7,>=2.5’ that is not resolvable by default.
See https://github.com/requests/requests/blob/v2.18.4/setup.py\#L44
<code class="python">
requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.7',
'urllib3>=1.21.1,<1.23',
'certifi>=2017.4.17'
]
</code>
The Python Requests package py-requests-2.19.1-r0
should set from edge
to stabel for v3.8 as soon as possible to avoid this dependency
mismatch, because Python Requests 2.19.0 already needs
‘idna<2.8,>=2.5’ (resolvable by default). See
https://github.com/requests/requests/blob/v2.19.0/setup.py\#L51
<code class="python">
requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.8',
'urllib3>=1.21.1,<1.24',
'certifi>=2017.4.17'
]
</code>
The same for Python Requests 2.19.1, see https://github.com/requests/requests/blob/v2.19.1/setup.py\#L51
(from redmine: issue id 9238, created on 2018-08-13, closed on 2018-12-20)
- Relations:
- relates #9053 (closed)
- Changesets:
- Revision add7b6dd by Fabian Affolter on 2018-09-27T06:45:28Z:
main/py-requests: upgrade to 2.19.1
fixes #9053
fixes #9238
(cherry picked from commit c2ede3db1fe3906163c2a37177c97d28e3b52490)