xraypy/xraylarch

[xas_viewer] Disable automatic check for updates or make it user settable

Closed this issue · 5 comments

maurov commented

@newville, on beamline machines where Larch is installed system-wide (binary or from source) we often have problems with the automatic check for updates. If we do not update Larch promptly after a release, it happens that either the users are annoyed to see this banner at each startup of xas_viewer or even worst that they click on OK button and install a local version of Larch that then goes into conflicts with what was installed before or breaks things that are tricky to debug (due to the fact that the installer calls pip install --upgrade xraylarch).

What about if we simply change check_version=False by default? Or add an option in LarchUpdaterDialog (or in the preferences) that will not check for new version at startup?

@maurov Good suggestion - I will change XAS Viewer to inform of new versions being available in the status bar.

@maurov But also:

pip install --upgrade xraylarch is not actually the problem. On Windows, it is a system error to try to overwrite an open executable. So basically, having an automatic update of a program from a program is not possible -- one could update libraries and files loaded, but not the actual .exe file. So, auto-updates on Windows from XAS Viewer were always failing.
I had already changed XAS Viewer "update" to either have the user copy and paste the pip command into a terminal, or to run the now-installed Desktop App "Larch Updater".

But, the version of 0.9.68 (or anything earlier) still has this problem, so updating to 0.9.70 will still require manual intervention and "pip update", and then things will be better...

FWIW, conda does not solve this problem. It's not pip. It's Windows.

maurov commented

@newville thanks for considering this issue.

Our case is on Linux, where I usually install Larch from source in a conda environment with an administrator account. If the user does the upgrade via pip on a user account, then two Larch versions get installed and this creates a mess. I need then to manually remove the user's local version and update the admnistrator's one separately.

I agree that conda will not solve this problem neither.

@maurov Ah, yeah mixing admin and user accounts is definitely a problem too. I know that some folks at the APS also want admin-installed system-wide installs (using debian packages + pip).

Anyway, turning down the notifications and making them informative should help....

@maurov I think we can close this.