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

jupyterlab-requirements should support fallback to micropipenv #592

Closed
llunved opened this issue Dec 5, 2021 · 6 comments · Fixed by #595
Closed

jupyterlab-requirements should support fallback to micropipenv #592

llunved opened this issue Dec 5, 2021 · 6 comments · Fixed by #595
Assignees
Labels
area/documentation Issues or PRs related to documentation, tutorials, examples, ... kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@llunved
Copy link

llunved commented Dec 5, 2021

Describe the bug
jupyterlab-requirements fallback requires pipenv. It should use micropipenv if that is available instead.

To Reproduce
Steps to reproduce the behavior:

  1. Create a container with jupyterlab-requirements and only micropipenv.
  2. Create a notebook and add a dependency.
  3. Try to resolve locally.
  4. See error

image

@llunved llunved added the kind/bug Categorizes issue or PR as related to a bug. label Dec 5, 2021
@pacospace
Copy link
Contributor

Thanks @llunved for opening this issue!

Micropipenv (https://github.com/thoth-station/micropipenv), despite the name, it is not a resolver, but it is used to install dependencies from a solved stack in containers.
In jupyterlab-requirements it is used once the locked files (created with Thoth or Pipenv) have been created.

So micropipenv cannot be used as fallback. For sure we can improve the message:

We can ask users to install Pipenv if they want to use the other resolution engine.

While for Thoth, we could list the environments available where Thoth has knowledge about.
(ubi 8 py38, fedora 34 py39 currently).

The UI in jupyterlab-requirements uses thoth by default and pipenv if there is any error. But in the magic commands and the cli this is not the case. User has to choose the dependency resolution engine.
Maybe we will standardize the behaviour also for the UI.

@pacospace pacospace added area/documentation Issues or PRs related to documentation, tutorials, examples, ... priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed kind/bug Categorizes issue or PR as related to a bug. labels Dec 10, 2021
@fridex
Copy link

fridex commented Dec 13, 2021

it is used to install dependencies from a solved stack

That is true. Moreover, micropipenv fallbacks to pip's resolution algorithm if the provided requirements are not locked which could fit into the requested feature. However, micropipenv (as of now) has no mechanism to obtain the locked stack from pip's resolution (related: thoth-station/micropipenv#151). We are monitoring efforts that want to bring pip's resolver into pip-tools in jazzband/pip-tools#1539. If that will be successful, we can check if pip's resolver API provides required features (such as specifying packages across indexes) -- if yes, we can try to incorporate pip's resolver into micropipenv so that micropipenv produces a lockfile in the end. It might be beneficial for provided environments (to still have a client resolver and not require to maintain pipenv as an rpm).

@goern
Copy link
Member

goern commented Dec 21, 2021

Micropipenv (https://github.com/thoth-station/micropipenv), despite the name, it is not a resolver, but it is used to install dependencies from a solved stack in containers.
In jupyterlab-requirements it is used once the locked files (created with Thoth or Pipenv) have been created.

This is a good explanation, could you add it to the screen show above?

@pacospace pacospace self-assigned this Jan 14, 2022
@goern
Copy link
Member

goern commented Jan 14, 2022

what is the status of this one?

@goern
Copy link
Member

goern commented Jan 14, 2022

/kind feature

@sesheta sesheta added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 14, 2022
@pacospace
Copy link
Contributor

what is the status of this one?

I'm gonna add the message to the UI and we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation, tutorials, examples, ... kind/feature Categorizes issue or PR as related to a new feature. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants