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 installed packages in .local/ break when Python version changes #317

Open
danielhollas opened this issue Oct 13, 2022 · 4 comments
Open
Labels

Comments

@danielhollas
Copy link
Contributor

Hi all,

just reporting my observation that when I tried to update to the new full-stack image, I noticed that packages installed locally via pip into ~/.local broke since the python version was updated. I guess this is a general issue, and not sure what the solution is.

Perhaps aiidalab should offer an option to automatically reinstall all apps? I guess this might be needed in addition to the Postgres migration if we need a clean migration path.

@unkcpz
Copy link
Member

unkcpz commented Oct 13, 2022

Thanks @danielhollas, do you mean that you use the aiidalab/aiidalab-docker-stack image with aiida-core 1.x and change it to full-stack? I think full-stack image won't use the ~/.local anymore but the package will be installed to the site-packages folder under /opt/conda/base?

@danielhollas
Copy link
Contributor Author

That's a good point. Are we sure that if the .local exists already, that it will be ignored in the full-stack image?

It's possible I saw the error when just upgrading the old aiidalab/aiidalab-docker-stack, since there was a Python version upgrade as well. But this is something that definitely needs closer look.

cc @yakutovicha @csadorf

@yakutovicha
Copy link
Member

The feature is there, but not documented, as usual =)

Here is an issue to add a button for the reset functionality of AiiDAlab: aiidalab/aiidalab-home#53

The script can be found here: https://github.com/aiidalab/aiidalab-docker-stack/blob/main/stack/lab/before-notebook.d/50_factory-reset.sh

To cover your use case, I believe it is enough to add to your home folder a file called AIIDALAB_FACTORY_RESET with the content 0b001.

@danielhollas
Copy link
Contributor Author

Oh cool, thanks! I'll give it a try when I get to it.

I was also thinking that it would be good to have a profile switching ability (this is alluded to in this comment . Not sure if this has been discussed, if not I'll open an issue and maybe try to discuss a bit at the next meeting.

@danielhollas danielhollas changed the title pip installed packages in .local/ break when upgrading image pip installed packages in .local/ break when Python version changes Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants