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

ibeis run error #83

Open
Meyerdk opened this issue Feb 4, 2023 · 10 comments
Open

ibeis run error #83

Meyerdk opened this issue Feb 4, 2023 · 10 comments

Comments

@Meyerdk
Copy link

Meyerdk commented Feb 4, 2023

Hi, hope you can assist? Thanx!

opencv-python was un installed and opencv-python-headless installed.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

@Erotemic
Copy link
Owner

Erotemic commented Feb 4, 2023

I recently wrote up a set of debugging instructions for this:

Check 1

Again run:

pip uninstall python-opencv 
pip uninstall python-opencv 
pip uninstall python-opencv-headless
pip uninstall python-opencv-headless

(As shown run each command twice to ensure there are not duplicates)

Now pip install python-opencv-headless. And check if that works.

If it breaks, rerun ibeis, but run:

export QT_DEBUG_PLUGINS=1

first to get more verbose output from PyQt and rerun ibeis.

Check 2

If that doesn't work let's dive deeper and debug it. I put together the following script that will provide me with more information I can use to help diagnose your problem.

#!/bin/bash
__doc__="
These are steps to help debug opencv / pyqt5 issues
"

# Where are your Python site packages?
PYTHON_SITE_PACKAGE_DPATH=$(python -c "import sysconfig; print(sysconfig.get_paths()['platlib'])")
echo "PYTHON_SITE_PACKAGE_DPATH = $PYTHON_SITE_PACKAGE_DPATH"

# Running X or Wayland?
echo "$XDG_SESSION_TYPE = $$XDG_SESSION_TYPE"

# Where is the cv2 library located
OPENCV_MODULE_DPATH=$(python -c "import cv2; print(cv2.__file__)")
echo "OPENCV_MODULE_DPATH = $OPENCV_MODULE_DPATH"

# What opencv packages do you have installed in site packages?
find "$PYTHON_SITE_PACKAGE_DPATH"  -maxdepth 1 -iname "*opencv*"

ls "$PYTHON_SITE_PACKAGE_DPATH"/opencv_python_headless.libs

# Where is PyQt5?
PYQT_MODULE_DPATH=$(python -c "import PyQt5; print(PyQt5.__file__)")
echo "PYQT_MODULE_DPATH = $PYQT_MODULE_DPATH"

Check 3

The above information should be enough, but if not there is additional information that might be useful:

#### If the above is still unclear, the kwimage / kwplot modules have useful
#### helpers for debugging pyqt issues.

# install kwimage / kwplot

pip install kwimage[headless] kwplot xdoctest

# Run the kwplot pyqt tests
export QT_DEBUG_PLUGINS=1
xdoctest -m kwplot.auto_backends autompl --check
KWPLOT_UNSAFE=1 xdoctest -m kwplot.auto_backends autompl --check
KWPLOT_UNSAFE=0 xdoctest -m kwplot.auto_backends autompl --check

@Meyerdk
Copy link
Author

Meyerdk commented Feb 5, 2023 via email

@Erotemic
Copy link
Owner

Erotemic commented Feb 5, 2023

First Numpy 1.24 have an issue with floats. I change the version to 1.23.4 solving the float issue

That is a good workaround for now. I'm working on releasing a new version of IBEIS where that won't be a problem.

Command 'xdoctest' not found, did you mean

Looks like xdoctest isn't installed by default. pip install xdoctest and rerun the parts where it failed because xdoctest was not found. I've updated the instructions to fix that oversight.

QLibraryPrivate::loadPlugin failed on "/home/meyer/.local/conda/envs/py38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so": "Cannot load library
/home/meyer/.local/conda/envs/py38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so:(libxcb-xinerama.so.0: cannot open shared object file: No such file or directory)" qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

The QT_DEBUG_PLUGINS output is helpful. The next step is to take a closer look at the libraries that failed to load. Run:

ldd /home/meyer/.local/conda/envs/py38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so

Or more generally (for other users that may be reading this) run:

PYQT_MODULE_DPATH=$(python -c "import PyQt5, pathlib; print(pathlib.Path(PyQt5.__file__).parent)")
echo "PYQT_MODULE_DPATH = $PYQT_MODULE_DPATH"

ldd "$PYQT_MODULE_DPATH"/Qt5/plugins/platforms/libqxcb.so

We want to check to see why libqxcb is failing to load. Using ldd to inspect the other modules it depends on may provide more information to continue debugging.

@Meyerdk
Copy link
Author

Meyerdk commented Feb 6, 2023 via email

@Erotemic
Copy link
Owner

Erotemic commented Feb 6, 2023

Ok, I see libxcb-xinerama.so.0 => not found as the main culprit. You should be able to solve this by simply installing it:

sudo apt install libxcb-xinerama0

@Meyerdk
Copy link
Author

Meyerdk commented Feb 6, 2023 via email

@Meyerdk
Copy link
Author

Meyerdk commented Feb 7, 2023 via email

@Erotemic
Copy link
Owner

Erotemic commented Feb 7, 2023

You haven't posted any image. Try using github directly.

@Meyerdk
Copy link
Author

Meyerdk commented Feb 7, 2023

image

@Erotemic
Copy link
Owner

Erotemic commented Feb 7, 2023

Ah, I recently fixed this issue and the fix should be released. Simply upgrade ibeis. pip install ibeis -U

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

No branches or pull requests

2 participants