Napari Mac crash

Hello Napari people,
Today I managed to mess up Napari installation on my clients Mac Desktop. I dont know how but today when I try to launch napari from the jupyter notebook I keep getting the message below and the kernel keeps dying:

My napari version is 0.3.4.

WARNING: QObject::moveToThread: Current thread (0x7f8205961f00) is not the object's thread (0x7f8205c072d0).
Cannot move to target thread (0x7f8205961f00)

WARNING: You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
WARNING: Could not load the Qt platform plugin "cocoa" in "/Volumes/Donnees/Utilisateurs/lboulan/opt/anaconda3/lib/python3.7/site-packages/cv2/qt/plugins" even though it was found.

You might now have multiple verison of qt present, looks like opencv might be causing the problem. Had you imported that in the notebook? See some discussion here https://github.com/napari/napari/issues/1026. It recommends using pip install opencv-contrib-python-headless

Also are you using pyside2 or pyqt5? You might want to try uninstalling which ever one you aren’t using as that could be causing problems.

1 Like

Yeah thanks @sofroniewn I came back home n read the warning in a bit more detail and thought the same about cv2 n yes I did import cv2 in that notebook. I use pyqt5 so I will try uninstalling pyside2 tomorrow then and I am sure that is the cause as import cv2 was the only change I made in that notebook. Thanks so much.

Ok, do follow up if that works/ doesn’t work - this stuff can be tricky and I’m sure others will encounter this stuff - we should probably add some info to a troubleshooting page too

Sure, I will let you know tomorrow when I get access to the user computer again if uninstalling opencv and re-installing anything solved the problem.