Skip to content
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 install should install packages in order to avoid ABI incompatibilities in compiled packages #4182

Closed
anntzer opened this issue Dec 13, 2016 · 13 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@anntzer
Copy link
Contributor

anntzer commented Dec 13, 2016

  • Pip version: 9.0.1
  • Python version: 3.5
  • Operating System: Arch Linux

Description:

pip install foo bar does not list packages in the listed order.

What I've run:

pip install numpy==1.8.0 matplotlib first installs matplotlib, which pulls the most recent numpy as a dependency, builds matplotlib against it, then downgrades to numpy 1.8.0 which has an incompatible ABI, and the matplotlib build is unusable.

Simimar to #3966 but I think the use case above (ABI compatibility) is yet another reason why the listed order of requirements should be respected: earlier requirements may pin the version of dependencies of later packages.

@dstufft
Copy link
Member

dstufft commented Dec 15, 2016

I don't think that installing packages in order is the right way to solve this, because at some point we're going to get parallel building and then we're still stuck here. I did however, want to link this to #988 and #4144, because I think it points out that we may not be able to completely have build dependencies be isolated like we originally planned.

@piotr-dobrogost
Copy link

piotr-dobrogost commented Dec 15, 2016

(...) yet another reason why the listed order of requirements should be respected.

Just a small remark from UX perspective. The common case is that the order should not matter thus by default pip should not obey the order. Respecting the order should be possible to switch on with a flag.

@anntzer
Copy link
Contributor Author

anntzer commented Dec 15, 2016

pip install --respect-order (up to option name bikeshedding) would be fine with me too.

@njsmith
Copy link
Member

njsmith commented Dec 19, 2016

This is an argument for isolated build dependencies IMO – matplotlib should be listing its build dependency as numpy == <whatever the oldest supported version is>, so if you do pip install matplotlib it pulls matplotlib + an old numpy, builds matplotlib against that, and then installs matplotlib + new numpy.

@dholth
Copy link
Member

dholth commented Dec 20, 2016

We have no way to express that every unique build of numpy can have an ABI that affects things built against it. I assume that you could have compiled numpy with options, and it wouldn't matter if you had compiled matplotlib against whatever the oldest supported version of numpy is, it would still be broken.

@njsmith
Copy link
Member

njsmith commented Dec 20, 2016 via email

@dholth
Copy link
Member

dholth commented Dec 20, 2016

Third, the traditional option followed by everyone else, conda, dpkg etc., which is to compile A with exactly the same B that will be installed.

@njsmith
Copy link
Member

njsmith commented Dec 20, 2016 via email

@dholth
Copy link
Member

dholth commented Dec 20, 2016

Good

@njsmith
Copy link
Member

njsmith commented Dec 20, 2016 via email

@pradyunsg
Copy link
Member

I think the best way to handle this is what @dholth says everyone else does:

compile A with exactly the same B that will be installed.

Basically, resolve the versions before starting the builds and use those versions specifically.

@westurner
Copy link

#988 "Pip needs a dependency resolver"

@dstufft
Copy link
Member

dstufft commented Mar 31, 2017

I'm going to close this, we're not going to make order something that people can control. If we need a better mechanism for handling ABI than we should figure out something that explicitly handles that (which would need to take place on the distutils-sig mailing list and likely a PEP).

@dstufft dstufft closed this as completed Mar 31, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

7 participants