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

Update README.md to include pyqt in conda install #44

Merged

Conversation

psobolewskiPhD
Copy link
Contributor

the napari package on conda-forge no longer includes a QT backend, see:
napari/docs#202
conda-forge/napari-feedstock#48

So the stand-alone conda instructions need to include one, e.g. pyqt.
Here's the napari.org instructions:
image
screenshot from: https://napari.org/stable/tutorials/fundamentals/installation.html#install-as-python-package-recommended

@haesleinhuepf haesleinhuepf merged commit ead7bb4 into haesleinhuepf:master Aug 12, 2023
7 checks passed
@haesleinhuepf
Copy link
Owner

Awesome, thanks @psobolewskiPhD !

@thawn
Copy link

thawn commented Aug 22, 2023

when I try mamba install pyqt I get the following error (on a M1 mac):

Encountered problems while solving:
  - package harfbuzz-7.3.0-h46e5fef_0 requires icu >=72.1,<73.0a0, but none of the providers can be installed

@psobolewskiPhD
Copy link
Contributor Author

psobolewskiPhD commented Aug 22, 2023

Is this into an existing env? I don't have that package in any of mine...
Can you try:
mamba repoquery whoneeds harfbuzz

Also you can try pyside2 instead of pyqt...

@thawn
Copy link

thawn commented Aug 22, 2023

@psobolewskiPhD thanks for looking into this 😄

Is this into an existing env?

no, it is a fresh env that I created just now for testing. My older devbio-napari environments do not have that issue either.

Can you try: mamba repoquery whoneeds harfbuzz

This returns:
libass 0.17.1 h4da34ad_0 harfbuzz >=7.2.0,<8.0a0 conda-forge

Also you can try pyside2 instead of pyqt...

mamba install pyside2 returns this error:

Encountered problems while solving:
  - package pyside2-5.15.5-py39h46bc059_1 requires qt-main >=5.15.4,<5.16.0a0, but none of the providers can be installed

@psobolewskiPhD
Copy link
Contributor Author

Hmm, I can't reproduce on my M1 using instructions from the README.
mamba create --name devbio-napari-env python=3.9 devbio-napari pyqt -c conda-forge -c pytorch
Can you give me a snippet of how you're making the environment?

@psobolewskiPhD psobolewskiPhD deleted the psobolewskiPhD-patch-1 branch August 23, 2023 01:16
@thawn
Copy link

thawn commented Aug 23, 2023

@psobolewskiPhD I can confirm, that the official install command fixed it for me

I had used the old install command from this blog post:

mamba create -n my_first_env devbio-napari python=3.9 -c conda-forge

I will create a pull request for that blog post shortly.

Btw, why is there -c pytorch in the install command? I did not see any package that was installed from that channel on my system.

Also, I suggest to put pyqt in the dependency list of devbio-napari - rather than in the installation instructions. Because it seems like it is not possible to fix a missing pyqt after installation (at least it was not possible for me).

@psobolewskiPhD
Copy link
Contributor Author

psobolewskiPhD commented Aug 23, 2023

If I recall PyTorch was needed for windows install?

Also, I suggest to put pyqt in the dependency list of devbio-napari - rather than in the installation instructions. Because it seems like it is not possible to fix a missing pyqt after installation (at least it was not possible for me).

This would actually be bad, because devbio-napari is technically an installable plugin.
See also: https://napari.org/stable/plugins/best_practices.html#don-t-include-pyside2-or-pyqt5-in-your-plugin-s-dependencies
So a user could try to install it into their existing napari ecosystem, which might use PyQT6 (like mine) or Pyside2 QT backends. Then, devbio-napari would install a second Qt backend, which would probably break the env.
Also, pyqt doesn't have arm64 wheels so someone using the build in plugin manager would get errors.

BTW: modifying your instructions also works for me:
mamba create -n my_first_env -c conda-forge python=3.9 devbio-napari pyqt
but indeed installing pyqt into an existing env fails as you described. I'm not sure why to be honest.

thawn added a commit to BiAPoL/PoL-BioImage-Analysis-TS-GPU-Accelerated-Image-Analysis that referenced this pull request Aug 25, 2023
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.

None yet

3 participants