-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip breaks when pip installs and conda uninstalls the same package #9129
Comments
Ah, so this is the cause to #8676, eh? We’ve had trouble reproducing this and you’re the first to identify a likely cause. Thanks for filling in the missing piece! This looks like a Conda bug. pip needs pip can’t really do anything here since uninstallation cannot be reasonably done without |
However, note that PEP 376 says that "Third-party installation tools also should not overwrite or delete files that are not in a RECORD file without prompting or warning." I would interpret that as saying that pip should include REQUESTED in the RECORD file. (The same would apply to INSTALLER, BTW). I do agree that conda should not respond to |
I believe pip does include them. The problem is Conda does not read |
Yea, this is almost definitely a conda bug. Could you file an issue on their tracker and crosslink to here? |
In the meantime, we can probably implement a safety net in
|
Apologies, I didn't check (I misunderstood the OP's report). Yes, it does - so this is definitely a conda bug, if it's not respecting the standard metadata. |
Are you asking me to do so? Or would it be better for one of you to do that, since you better understand the issue and will know how to present it correctly to the other side. |
As we're not conda users, we can't really help the conda devs to identify and address the issue. And as you're the one seeing the issue, I'd assume you're motivated to push for a fix, so you would be a better person to create a conda issue. (I don't even know where I'd file an issue against conda!) |
As a simple bug report, you could simply put
Add your own example of how to reproduce the issue, and feel free to link back here for more details on why this isn't a pip bug. |
Thank you for that additional bit that was missing from my investigation, @pfmoore. I will file the report and link back here. conda/conda#10357 |
No problem! Thank you for taking the time to dig into this - the "METADATA issue" #8676 has been a long-running problem for us, and it's great to understand what was going on here and finally identify how it needs to be fixed! |
Environment
Description
This is a bug in pip, but it gets triggered by conda.
When installing a package explicitly it creates an empty file
REQUESTED
, which conda can't delete and everything blows up.Expected behavior
Since conda removes explicitly the files in its manifest unlike pip which removes the whole dir, adding new files that are not in manifest breaks things.
How to Reproduce
This file wasn't in conda-forge build, but was added by pip - conda doesn't know to remove it since it removes files explicitly only the ones it installed, but pip removes the dir.
So now the site-packages is broken and we can't use
pip
anymore:"Requirement already satisfied" is bogus since there is just one
REQUESTED
file that wasn't cleaned up in the dist dir.this fails too:
The only fix at the moment is to manually remove the dir by hand.
I have a package whose build process validates that the conda/pip installs worked correctly and so it happens to hit a similar sequence. But this can easily happen in real life, except install / uninstall commands can be called days apart...
The text was updated successfully, but these errors were encountered: