Search code examples
pythoninstallationpypi

How to install IBEIS software in python 3.12.3


I've been attempting to follow the instructions on the software website, which states the software is available in pypi for Linux (I'm using Ubuntu 24.04) but all methods I've tried are prompting error messages and I'm not well enough versed to figure out how to address them.

So far I've run:

pip install ibeis and sudo pip install ibeis Which prompts: error: externally-managed-environment

This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

Then as suggested: sudo apt install python3-ibeis And get: Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package python3-ibeis

Then: sudo pipx install ibeis Which starts to install but then: Fatal error from pip prevented installation. Full pip output in file: /root/.local/state/pipx/log/cmd_2024-09-25_17.06.18_pip_errors.log

pip failed to build packages: pyhesaff vtool-ibeis-ext

Some possibly relevant errors from pip install: error: subprocess-exited-with-error ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyhesaff, vtool-ibeis-ext)

Error installing ibeis.

These dependencies are mentioned as possibly causing issues on the website, but the work around given pip uninstall opencv-python pip install opencv-python-headless I also couldn't get to work (using any combination of sudo, pip and pipx, and in python3)

I'm sure I'm doing something stupid but I don't understand enough about it to work out what I'm doing wrong, if anyone has any tips it would be greatly appreciated!

EDIT: Apologies the link to the website and instructions https://pypi.org/project/ibeis/ If you scroll down slightly they're here

I went through the advice bellow and have tried installing in a virtual environment, the install seems to run fine but when I try and run it I get the new error message:

[main!] WARNING: args.dbdir is None
[main] _init_gui()
[guitool_ibeis] Init new QApplication
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)

I found on another query that some people have found going back to older versions of python helpful but that didn't have an effect here.


Solution

  • Expanding on my comment, I have successfully installed ibeis in a conda environment on an Ubuntu machine.

    First you will need to install conda, via the instructions here - I would recommend going with Miniconda, e.g.,

    mkdir -p ~/miniconda3
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
    bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
    rm ~/miniconda3/miniconda.sh
    

    Then you can create a new environment in which to install ibeis, e.g.,

    conda create -n ibeis-env python=3.11
    

    The above command creates an environment called ibeis-env (you could use any name you want here) within which Python 3.11 is installed (you could try using python=3.12 and it might well still work, but isn't guaranteed).

    Next, activate the environment and install ibeis with:

    conda activate ibeis-env  # activates the environment
    pip install ibeis[headless]
    

    Note that the [headless] dependency for ibeis will probably be required due to open-cv issues (you could try installing it without, but it didn't work for me).

    Then you should be able to launch the ibeis GUI with:

    ibeis &