-
Notifications
You must be signed in to change notification settings - Fork 3
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
Module path discovery is broken #25
Comments
@ispielma You mentioned that you successfully installed labscript from scratch just last week. Could I trouble you for some details? Python version, conda version, OS, installation method would be helpful. |
Sure. I did the (1) my mac starting with a miniconda install with versions:
(2) A windows 10 PC starting with a miniconda install with versions:
In both cases the only issue was the one where I had to make the main git repo an upstream repository for each labscript repository on my computer (even though they were cloned from my fork) and then manually pull over all the version flags. |
@ispielma Could you also say what pip version you have? It appears this has something to do with pip modifying its behavior when installing in editable mode around pip==22. Edit: I believe this issue hints at the problem. It looks like pip isn't super happy with our dynamic versioning and it can slightly bork the installation such that desktop-app's heuristics for finding paths and packages breaks, but the installation imports and works. More research needed. |
Updated above, but in any case |
I think I've found a fix for this issue, but it doesn't account for Ian's installation actually working. Short of it is pip==22 brought in support for PEP 660 handling of editable installations which breaks desktop-app's logic for finding the distribution name of the module. If that's true, Ian's installation shouldn't have worked. Now, this issue is only encountered if desktop-app is used to generate the GUI desktop shortcuts. So just to confirm, @ispielma, did you use desktop-app to generate desktop shortcuts on both of those installations? |
I cannot confirm that the desktop shortcuts were generated on the mac install, but they are present on the PC (and I have used them for Lyse at least once). Generally I run everything from the command line, so I have not tested the shortcuts extensively. |
Ah OK. That makes more sense. I suspect if you tried to run desktop-app to (re)create the shortcuts you'd see this broken behavior. I'll knock together a PR with the change that I think is necessary to sort this out. |
Issue initially raised in labscript-suite/labscript-suite#83. I'm not able to reproduce the issue raised there exactly, but I am getting some crazy stuff that just doesn't make any sense to me.
My test script
I generally see two types of outputs from this script depending on if things work or not.
lyse/*
type paths.get_distribution_of_module
. The only paths I get from the lyse search areI have a number of labscript installations I can try this script on throughout the lab, and I can't find a consistent thread.
Best guess is that
importlib_metadata.distributions
reports differently depending on conda enviroment and python version. Now that I think about it, all of these installs are using the anaconda developer instructions, so those conda version (from the base environment) maybe aren't being used on the newer installs consistently (since setuptools-conda install conda locally to the environment as well).The text was updated successfully, but these errors were encountered: