Conda developer install fails with setuptools=65

43 views
Skip to first unread message

Johannes Schabbauer

unread,
Dec 12, 2022, 5:34:47 AM12/12/22
to the labscript suite
Hi,

Currently the developer installation with conda fails to run components of labscript. I attached a screenshot of the Error. This can be fixed by installing setuptools=63.4.1 in conda before running the pip command in the install instructions.

The error is exactly the same for setuptools version 65.4.0 and 65.5.0, tested both on Win10 and Linux.

A possible fix I found in the release notes of setuptools (v64) is to pass the option "--config-settings editable-mode=strict" in the pip command for installation. This also seems to work. Does someone know where this option can be set in the project files of each repository?

Bets wishes,
Johannes
Screenshot from 2022-12-12 10-58-42.png

Johannes Schabbauer

unread,
Dec 12, 2022, 6:00:22 AM12/12/22
to the labscript suite
Right now I noticed that although passing the editable-mode=strict option to to pip command works that the components can be run from the command line, the "desktop-app install" command is still broken.
So for making the installation compatible with the newest setuptools version might need some other changes.

dihm....@gmail.com

unread,
Dec 12, 2022, 4:39:17 PM12/12/22
to the labscript suite
Great. I'm sure this will be a lot of fun to fix.

Looking through the docs for setuptools, there is a potential 3rd option for getting things working in the transitional period by using compatibility mode.

If not too much trouble, could you try this out and let me know if it works? If so, that will help narrow down where the issue actually lies. I'm guessing the entry points have been mucked with a bit. In any case, we can pin down setuptools to prevent new installs from breaking out of the box for the time being.

Thanks for letting us know Johannes!

Chris Billington

unread,
Dec 13, 2022, 4:14:25 AM12/13/22
to labscri...@googlegroups.com
Hi Johannes,

Thanks very much for making us aware of the issue.

I've made an attempt at fixing it in desktop-app, the package that the problem is affecting. The fix is here:

https://github.com/chrisjbillington/desktop-app/commit/3701c2b28b6fc89e5dfa76888f1ab5407daa1c76

There's a problem making a release of desktop-app that I will have a look at later (GitHub actions for building the package are failing, grumble grumble), but in the meantime you might want to test if the changes fix the problem - worst case, just by copying the changes into ~/miniconda3/lib/python3.8/site-packages/desktop_app/environment.py.

Regards,

Chris

--
You received this message because you are subscribed to the Google Groups "the labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/labscriptsuite/62822d5a-ce1e-400b-b0a7-7264af5af8f4n%40googlegroups.com.

Johannes Schabbauer

unread,
Dec 13, 2022, 9:35:55 AM12/13/22
to the labscript suite
Hi David, Hi Chris,

Thanks for your suggestions and your quick suggestion of the code change.
I did some tests for them, and both do not seem to work completely:
  • When using the "compat" option for pip, there is exactly the same error as when using "strict", i.e. the labscript programs can be started, but "desktop_app install" fails in the same way.
  • This should be fixed by your changes in the new commit for desktop_app. The graphical components can be launched and the "destop_app install" command works fine (regardless if and which editable-mode option is used). But then I cannot import user_devices in python (ModuleNotFoundError) and when opening BLACS there are errors from the device registry (same reason). 
So I think your change should fix the desktop_app package for the setuptools version, but there is still another issue with adding the userlib to the Python path.

Best wishes,
Johannes

Chris Billington

unread,
Dec 13, 2022, 6:34:03 PM12/13/22
to labscri...@googlegroups.com
Hi Johannes,

Good to hear the issue from desktop-app is resolved - I'll see if I can fix the desktop-app build and get a new release out that will fix this for others.

With the remaining issue importing user_devices, I would guess that the labscript-suite.pth file, which adds user_devices to the import path, is not being added to site-packages for editable installs. In pre-PEP-660 editable installs, it was added via a custom "develop" command in setup.py:


But this must not be getting called now. I'll investigate whether there is a recommended or obvious way to add .pth files as part of installing editable installs in the post-PEP-660 world, otherwise I'll figure out an appropriate hack.

If you want to get it working manually for now, you could manually copy labscript-suite.pth from the labscript-suite source directory into site packages (~/miniconda3/lib/python3.8/site-packages or similar).

Thanks,

Chris

dihm....@gmail.com

unread,
Dec 24, 2022, 9:50:29 AM12/24/22
to the labscript suite
Johannes,

I realize I forgot to circle back on this. The second required fix in labscript-utils is now included into the mainline so hopefully this issue is nominally fixed.

Thanks for bringing this issue to our attention and many thanks to Chris for sorting it out so quickly!

Happy Holidays Everyone!

Reply all
Reply to author
Forward
0 new messages