|
|
|
|
|
by geofft
2505 days ago
|
|
> Pip freeze does not resolve transitive dependencies I don't think this is correct: $ python3 -m venv /tmp/v
$ /tmp/v/bin/pip install flask
[...]
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->flask)
[...]
$ /tmp/v/bin/pip freeze | grep MarkupSafe
MarkupSafe==1.1.1
> nor does pip know what to do if your transitive dependencies conflict with each anotherThis is true, but because Python exposes all libraries in a single namespace at runtime, there isn't actually anything reasonable to do if they genuinely conflict. You can't have both, say, MarkupSafe 1.1.1 and MarkupSafe 1.1.0 in PYTHONPATH and expect them to be both accessible. There's no way in an import statement to say which one you want. However, it's notable that pip runs into trouble in cases where transitive dependencies don't genuinely conflict, too. See https://github.com/pypa/pip/issues/988 - this is a bug / acknowledged deficiency, and there is work in progress towards fixing it. |
|
This would be fixable with a sys path hook, were pip so inclined