Search code examples
python-3.xtensorflowpyqt5

OSError: cannot load library 'libxcb.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libxcb.dll'


my computer was the victim of a virus which erased everything (the virus which puts everything at 0KB). so I had to reinstall my operating system as well as all the dependencies of my python project (a facial recognition project that I preserved in git without venv). I then did a pip install -r requirements.txt, there was no error but when I ran my project the following error appeared:

SError: 

    no library called "cairo-2" was found
    no library called "cairo" was found
    no library called "libcairo-2" was found
    cannot load library 'libcairo.so.2': error 0x7e
    cannot load library 'libcairo.2.dylib': error 0x7e
    cannot load library 'libcairo-2.dll': error 0x7e

. as I already encountered this problem before, I downloaded gtk3-runtime win64 to remedy it. after installing gtk I restarted my project and it gave me the following error: OSError: cannot load library 'libxcb.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libxcb.dll' . I've searched but I can't find a solution. I would like to point out that I am using python 3.9.0 and gtk3-runtime-3.24.31-2022-01-04-ts-win64. If anyone can help me, thank you


Solution

  • I solved the problem by reinstalling my requirements with a better quality connection and then installing gtk3