-
Notifications
You must be signed in to change notification settings - Fork 104
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
Support for full pip requirements.txt syntax in environment.yml? #171
Comments
So part of that is possible and part of it is not entirely, Since the pip solver being used is the poetry solver the configuration for The pypi repositories being used are defined in https://github.com/conda-incubator/conda-lock/blob/9a1132d703dd34a5524becba15b976769781d52d/conda_lock/pypi_solver.py#L200-L201 , there is already a feature request to support those a bit better in #135 so adding in that should potentially be feasible. |
The harder part is which pip install arguments to support generically as there are quite a few of them and the mapping of them to poetry flags isn't necessarily trivial |
Yep indeed in practice we would want prerelease versions only for a few packages e.g. numpy, scipy, pandas so it would be fine to do it on a per-package basis.
OK nice. There was actually a third hidden feature request in my original post: having dependencies like
Full error
|
Maybe this should be a separate issue, but I think it's related. I was wondering how to get conda-lock to install pip dependencies a la |
@rcthomas, is this motivated by reducing disk space for Docker or other space-constrained environments? Unfortunately I don't think there's a good way to this automatically with the way things are currently structured. Manually deleting the cache seems to me like the way to go. |
@maresb no, not disk space, I just sometimes want to make sure that I'm not using the pip cache directory when building packages from PyPI. The reason I followed up on this thread instead of opening a new one is that I'm actually not looking for a way to do this automatically, I was wondering if I could tell conda-lock to pass arguments like OP asked about, but to prevent using the pip cache (as if one were passing |
A simpler but related usecase, would be nice if
|
Ya, I see this thread as good motivation to eliminate conda-lock's use of Poetry, replacing it with a generic solver. |
How does one get the poetry dependency solver in conda-lock to set |
I don't think we currently have any way to activate |
Ah ok. That's a shame because pip's default behaviour is to find pre-releases when it can't find a stable release (which is the issue in my case... installing the conda environment works fine but exporting it using conda-lock fails). I'll look into it but not familiar with poetry at all! |
This may be stretching conda-lock a bit, but would there be a chance to support full pip requirements.txt syntax in environment.yml like the following one? This is supported by conda and mamba, see conda/conda#3969 for conda support:
The use case we have in scikit-learn:
Right now I get an error when trying to lock the environment because
--pre
does not look like a "standard" requirement e.g. something likepackage>version
.The full output with the error:
The text was updated successfully, but these errors were encountered: