napari: Napari as a plugin depency can break napari conda install
š Bug
Napari as a plugin dependency can break napari conda install.
To Reproduce
Steps to reproduce the behaviour:
- Have a Python 3.9 fresh conda environment on Ubuntu 21.10 and installed napari through conda.
conda create -y -n napari-env-testing -c conda-forge python=3.9
conda activate napari-env-testing
conda install -c conda-forge napari
- Install a plugin that has napari in its dependencies.
pip install git+https://github.com/deep-finder/napari-deepfinder.git@194fef7d6c87141fdf656b4013dcef3f4c1ff033
- Try to launch napari:
napari
Expected behavior
It should not break the conda install, after removing napari from dependencies all works fine. After having removed the napari dependency, all works fine: when following the same procedure but installing the following plugin version:
pip install git+https://github.com/deep-finder/napari-deepfinder.git@7bcc71552458f5c2cd109fd25df0369e7b9cc267
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (21 by maintainers)
I use pyenv for manage environments. And all try to work on base anaconda env ends with tragedy.
Let me give a little bit of a higher-view summary here to let you know what Iām thinking:
in a fresh ubuntu install, Qt wonāt actually work without additional libraries. This is why on github actions, we add this
setup-qt-libs
action that you use in your tests. What that does is install a bunch of libraries that are missing on ubuntu that are required to run a Qt GUI.When you install pyqt from conda it comes with a ton of pre-compiled libraries on linux, so
conda install pyqt
should ājust workā on ubuntu⦠but those libraries will be restricted to your conda environment. However, if you pip install PyQt, it doesnāt come with those libraries, so usually you will need to install them system wide using something like:So, depending on your system libraries, and the order & source from which youāve installed pyqt (i.e. from conda and/or from pip), you will usually run into one variant of the missing library issue.
thanks! Can you paste what error you get? It sounds kinda like youāre running into the classic xcb missing libraries issue, but itās hard to say without more info (and itās also not clear why that would be the case only when you also install napari).
If your error seems to come from qt, can you also try the following, and paste the output?
i understand where youāre coming from here. and itās āfineā if you want to have a package that only works in certain environments. I guess the main counterpoints are
@cnstt I cannot reproduce the error on bare metal Ubuntu 21.10. So same version as you report. So if you still have an error please attach a stack trace (or another error report). I agree that most probably a source of error is installing PyQt5 again.
We may try even try to organize debug session on a zulip/zoom/gather to find real source of the problem.
But first, try to reproduce errors in environments created from scratch. Without any additional plugins.
And without removing PyQt5 (and maybe pyqtgraph) from deepfinder dependencies you will always have problems. Because the napari bundle works with PySide2 backend, so it creates a bigger problem.
I do not think that adding
gui
and curating imports is a big problem.