我的计算机是病毒的受害者,该病毒删除了所有内容(该病毒将所有内容变为 0KB)。所以我必须重新安装我的操作系统以及我的 python 项目(我在没有 venv 的情况下在 git 中保存的面部识别项目)的所有依赖项。然后我做了一个
pip install -r requirements.txt
,没有错误,但是当我运行我的项目时,出现了以下错误:
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
。因为我之前已经遇到过这个问题,所以我下载了gtk3-runtime win64来解决它。安装 gtk 后,我重新启动了我的项目,它给了我以下
error: OSError: cannot load library 'libxcb.dll': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libxcb.dll'
。我已经搜索过但找不到解决方案。我想指出,我正在使用 python 3.9.0 和 gtk3-runtime-3.24.31-2022-01-04-ts-win64。如果有人可以帮助我,谢谢
我通过使用更好质量的连接重新安装我的要求,然后安装 gtk3 解决了这个问题