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

ENH Add support for reinstalling packages (take 2) #206

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

ryanking13
Copy link
Member

Resolve #51

Rebases #64.

This adds a new parameter, reinstall to the micropip.install API.

When the requested package is already installed in the system, and if it is not compatible:

  • reinstall == False (default): raises error.
  • reinstall == True: uninstall the installed package and install the new one.

image

Comment on lines 69 to 71
with indent_log():
uninstall_distributions(distributions, logger)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this only happen if reinstall is True?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The distributions parameter will always be an empty list if reinstall is false, as the transaction will not add any package that are already installed when reinstall is false.

But I think I can add that check just in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to reinstall a different version of a package
2 participants