urllib3 dependency issue
See original GitHub issueThe installation of the last dvc version (0.40.2) with google storage (pip install --no-cache-dir dvc[gs]
) randomly fails because of a dependency conflict for urllib3 between requests
('urllib3>=1.21.1,<1.25'
) and dulwich
('urllib3[secure]>=1.23'
).
More precisely when installing dulwich
first, it installs the last urllib3
version (1.25.2) which conflicts with requests
.
For reproducibility, here is the Dockerfile that I use:
FROM python:3.7-alpine
RUN apk add --no-cache zlib-dev jpeg-dev gcc musl-dev \
&& pip install -U pip \
&& pip install --no-cache-dir dvc[gs]
related to https://github.com/pypa/pip/issues/988
Short term solution: Add urllib3==1.24.3
to setup.py and requirements
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (3 by maintainers)
Top Results From Across the Web
cannot resolve urllib3 version issue - python - Stack Overflow
It is likely that your Python environment already has urllib3 installed, and something requires its version different than the one needed ...
Read more >Contributing — urllib3 1.23 documentation
Check for open issues or open a fresh issue to start a discussion around a feature ... We use some external dependencies, multiple...
Read more >Problem with shub deploy dependencies - urllib3 - Zyte
Hello, i'm quite new to Python and ScrapingHub, but I can solve most of the issues. However, after long research, i cant find...
Read more >Managing Python Dependencies with Requirements.txt
Let's say you install urllib3 from pypi.org. The required dependencies for urllib3 can be seen below. pthon requiremtn files image 1. One of...
Read more >urllib3 [python-library] - Occam :: Details
pip install urllib3[secure] will install Certifi and PyOpenSSL as dependencies. (Issue #678). Made HTTPHeaderDict usable as a headers input value (Issues ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would suggest checking the indirect dependencies of the package using tools like pip-compile before pushing a new release.
Or maybe rely on more complete python package management tools like Pipenv or Poetry
Example output of
pip-compile
on the current master branch, where we see that the workingurllib3
version is 1.24.3 and NOT the last 1.25.2:Indeed!
It still might be useful to adopt a more systematic approach for dependency resolution for the future (cf. https://github.com/iterative/dvc/issues/2008#issuecomment-492657143)