Pip upgrades dependency installed as `flit install --symlink` editable install.
See original GitHub issuepip version
20.3.1
Python version
3.9.1
OS
Arch Linux
Additional information
No response
Description
Installing a project B that depends on a project A will modify A’s installation without need.
This is specifically problematic when A is installed in editable/develop mode using flit install --symlink
.
I assume pip treats editable installs in a magic special way, but doesn’t identify symlinked installs as editable.
Expected behavior
Pip should not downgrade dependencies, especially not development dependencies
How to Reproduce
$ conda create -yn flit-deps python=3.8 flit
$ conda activate flit-deps
$ git clone https://github.com/theislab/scanpy.git && cd scanpy
$ git switch flit || true # go to the flit branch if it hasn’t been merged int master yet
$ flit install -s --dep=develop # Make development install of scanpy
$ pip install scvelo # Install project that depends on scanpy
Output
...
Attempting uninstall: scanpy
Found existing installation: scanpy 1.8.0.dev49-ge715cd98
Uninstalling scanpy-1.8.0.dev49-ge715cd98:
Successfully uninstalled scanpy-1.8.0.dev49-ge715cd98
...
Successfully installed loompy-3.0.6 numpy-groupies-0.9.13 scanpy-1.7.0 ...
...
# Development version of scanpy has now been uninstalled in favor of an older stable version
Code of Conduct
- I agree to follow the PSF Code of Conduct
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
22.1: Editable installs for packages with extras & flit causes ...
Our dependencies are entirely managed within a pyproject.toml , with a small stub setup.py to help pip do an editable install.
Read more >When would the -e, --editable option be useful with pip ...
As the man page says it: -e,--editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a local project ...
Read more >Flit Documentation
INSTALL. $ python3 -m pip install flit. Flit requires Python 3 and therefore needs to be installed using the Python 3 version of...
Read more >Flit command line interface — Flit 3.8.0 documentation
Generate a setup.py file in the sdist, so it can be installed by older ... you use the --symlink or --pth-file options, pip...
Read more >Pip 19.1 and installing in editable mode with pyproject.toml
Get all necessary build dependencies (PEP 518); Install any new dependencies; Run any necessary build or compilation steps. And it stopped all ...
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
Sounds like we have figured out the problem here and the fix to it. Thanks for everyone involved here! I’ll close this and continue the work at Flit’s side. Feel free to open further issues if more is needed from the pip side to make this work.
Actually
flit install
with--symlink
and--pth
generate proper dist-info metadata (and adirect_url.json
like this{"url": "file:///tmp/foobar", "dir_info": {"editable": true}}
, /tmp/foobar being the project location).I’ve not tried this example, but with a sample flit project, both
pip freeze
andpip list
generate something meaningful in such a situation.So at first sight I’d think all the necessary standard-based information is present for pip to work properly.
I’m not too sure what’s happening here. It looks like pip is downgrading scanpy ?