-
Notifications
You must be signed in to change notification settings - Fork 3.1k
pip install -U might reinstall same version of package #2472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Why are you using |
I want to upgrade |
|
It's what I have right now (allsetups.sh), we'll see. It's the fourth attempt already. |
closing. I think @xavfernandez 's advice is correct. |
The fact that it re-installs the same version of a package over the editable one is of no concern to anyone? |
oh, I see, reopened. will try to recreate locally and see where this breaks down |
Personally, my feeling is that there's a conceptual difference between "normal" requirements and requirements based on a VCS URL or editables. A lot of things have problematic edge cases when the 2 come into contact. That's not much help in this particular case, and a "tactical" fix is better for now, but longer term I think pip needs to come up with a better classification of the different types of requirements and how they work together... |
pip has code to determine the version of an editable package (using things like git tags, see get_src_requirement()), so it makes sense to use that information. But I agree that it might be clunky in some situations. |
I tried to recreate this with local clones of:
deform depends on peppercorn. things worked as we would want, not as you describe
the final install reports:
and
|
I can still reproduce it here:
pkga/setup.py:
pkgb/setup.py:
|
On Debian:
See here: https://github.com/remram44/_pip-install-issue |
what you reproduced is different than the original description. I think your 2nd reproduction is a real bug, but not as concerning as your first claim. can you reproduce the first claim in a way I can reproduce? |
This is the exact same bug, pip looks up a package on pypi although it's already available locally. I have no doubt that if pkga had been there it would have been installed. If you replace 'pkga' with the name of any package that's on pypi (with the appropriate version) you'll get the first error I showed. |
I replaced:
with
and did not recreate what you describe (where peppercorn was already installed from local path) I got
|
Yes, I see that as well with peppercorn: https://travis-ci.org/remram44/_pip-install-issue/builds/53298176 I don't know what to tell you, I see what I see, so does Travis. Can't debug further right now but something is definitely wrong. |
where's the travis link that shows this? I see 2 travis links in this issue. one is the case with peppercorn working correctly, the other is the case of pkga not existing on pypi. |
I might be misunderstanding this because this is fairly long and difficult for me to follow, but I feel like this might be the expected behavior. pip's default place to look for packages is PyPI; I don't think that because you installed a package from a local file on your system that this will change that and not make it look at PyPI. So you're doing:
and getting pkga==0.6.1. Nothing controversial there. Now you do:
even though you specified -U and only It seems a little odd/wrong to me that if it doesn't find As for the fact that it installs it from PyPI if it finds it -- I guess this could be right or wrong depending on how you look at it. Intuitively, I can see why this seems wrong to install something that you already have. On the other hand, and this is speculation, I think that probably
If --upgrade didn't reinstall despite the version number being the same, that would be kind of a pain, because you'd have to bump the version whenever you make a change. But I'll let someone who knows things better say whether this is right or not. |
Yes, but how do you justify replacing a package with the same version number?
We agree. Failing because something you didn't ask for and that isn't required didn't work is definitely a peculiar approach. |
but so far, you haven't shown that pip does that. still waiting for a public example that I can recreate. everything so far, shows that it doesn't do that.
and I agree to. my plan at this point is to open a bug for this lesser issue and close this issue, unless you can provide an example for the original description. |
Do that, I probably won't lose any more time arguing with the pip team again. (do check out #1829 someday though) |
arguing? just trying to get a reproducible example... |
ok, closing as "can't reproduce" for now. |
My project consists of several Python packages that depend on each other:
pkgA
, andpkgB
that depends onpkgA
.I install pkgA with
pip install -U -e ./pkgA
Then I install pkgB with
pip install -U -e ./pkgB
. Doing that, pip removes pkgA, downloads one from pypi (the exact same version that was installed) and installs it. Then I lose half an hour trying to figure out things in a broken dev environment.I'm going back to running
setup.py develop
because setuptools work, but it sounds like something you might want to know.The text was updated successfully, but these errors were encountered: