-
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
specifying an order of install with requirements.txt #2362
Comments
This has bothered me for some time. It would be nice if there was a pip freeze that wouldn't always necessary print them by alphabetical order but rather top down or bottom up. I'll probably write in a command option and do a pull-request. Stay tuned. |
I'm more concerned about going the other direction. Cases where a package However, if what I'm suggesting is in place, then it would be good if
|
That's actually not a bad idea; pip freeze based on file timestamp. Currently it's not in there; pip freeze right now actively sorts alphabeticaly. It's definitely its doable. So what you're saying is a way to specify certain packages as not required but possibly recommended? Like IPython? I don't need it, but it's definitely nifty at times to install it. |
Yes and no. There's no way here to specify a package will use Cython if
|
The order of installation can not be depended on, in the future this is likely to get changed so it can build/install in parallel. I don't see us changing this at any point. |
As for me, I think I'd rather have a convenient way of duplicating a build environment then to have some speed increase from parallel installation. If the order the packages are installed affects the state of the environment (which even though it probably shouldn't does occur), wouldn't it make sense to have some way to enforce that order? Perhaps some method of grouping or giving a priority score? |
Has the policy changed? It seems like the latest release of pip installs in the order it finds them in the file. |
I just drop by to say it's horrible. I have a |
I've switched to having a "requirements-buildenv.txt" and then a "requirements.txt". The first has such things as pip and cython versions and the latter is everything else that can be installed in any order. |
@Demetrio92 - thanks for linking that! I wasn't aware of that PEP. I'm not sure it helps when trying to pin all dependencies to particular versions to make sure your dev environment matches your production environment (which is what I use the requirements.txt for, as well as just collecting dependencies). |
@tisdall seems to be able to specify versions the same way |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
My issue is specifically with using Cython. Several packages I have make use of Cython to compile package components only if it's available. If the package isn't available it uses a pure-python approach. So, I'd like to make sure Cython is installed first before those other packages so it properly compiles C extensions.
I saw another issue related to this but it was specifically talking about utilizing order to fix dependency issues. This issue is when it's a package that's not a dependency but if it exists it's utilized.
I stuck Cython at the top of the list but it seems to actually have installed it dead last instead of first. I notice that the order of install was opposite of the order of the file, so I then stuck Cython at the bottom and it seems to be the second one to be installed. It seems like if packages have no interdependencies it should install them in the order they're found in the file (and not reverse order).
The text was updated successfully, but these errors were encountered: