OSError: no library called "cairo-2" was found
环境
Windows 11
python 3.8.13 (anaconda->envs)
PyCharm
场景
我使用了GitHub上的第三方组件进行GUI开发,https://github.com/KhamisiKibet/QT-PyQt-PySide-Custom-Widgets
按照README.md中的指示,进行安装后的测试
Installation Testing
Run the following code to see if the installation was successful.
# Run this from your terminal or create a python file,
# paste this code, then run
from Custom_Widgets.ProgressIndicator import test
test.main()
然后得到报错:
OSError: 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
解决方案
在这个https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer下载:
(此图片源自:https://blog.csdn.net/bz_xyz/article/details/104637487)

下载并安装(一路默认选项即可,当然你也可以把安装位置换到你喜欢的任何位置都可),结束后可以发现系统变量 PATH 已经自动加入环境变量:C:\Program Files\GTK3-Runtime Win64\bin,如果没有需要自行加入。
然后重启你的开发环境(PyCharm)或者VS Code,进行测试,如果仍然存在问题,则,
在系统环境变量中,将上文提到的path路径上移到最前面,保证最开始能读取到该路径,重启开发环境,即可解决问题!
OSError: no library called "cairo-2" was found的更多相关文章
- cairosvg使用过程中需要注意的问题
在使用pygal的过程中,图片默认保存的是svg格式,如果需要生成本地的图片需要进行一些配置.下面是在摸索时的一些流程: 1.查看pygal的函数,dir(pygal.bar),发现其支持保存为png ...
- Awesome C/C++
Awesome C/C++ A curated list of awesome C/C++ frameworks, libraries, resources, and shiny things. In ...
- C/C++ 框架,类库,资源集合
很棒的 C/C++ 框架,类库,资源集合. Awesome C/C++ Standard Libraries Frameworks Artificial Intelligence Asynchrono ...
- awesome cpp
https://github.com/fffaraz/awesome-cpp Awesome C/C++ A curated list of awesome C/C++ frameworks, lib ...
- 【干货】国外程序员整理的 C++ 资源大全【转】
来自 https://github.com/fffaraz/awesome-cpp A curated list of awesome C/C++ frameworks, libraries, res ...
- Awesome C/C++(图像部分)
GUI Graphic User Interface CEGUI - Flexible, cross-platform GUI library. FLTK - Fast, light, cross-p ...
- Arch系统软件列表
1. 安装统计 2. 安装列表 3. 安装说明 4. 作为依赖项的安装列表 5. 更正 mangaro使用减的方式安装系统.开箱即用的豪华版本,大部分人需要的都有了,同样包括个别用户不需要的,配置方面 ...
- OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so
OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so ...
- mac下载模块时报错OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/chardet'
原文地址:https://www.cnblogs.com/liangyan-1989/p/8143129.html 安装完pip后,使用pip install selenium报以下错 OSError ...
随机推荐
- BMZCTF ssrfme
<?php if(isset($_GET) && !empty($_GET)){ $url = $_GET['file']; $path = "upload/" ...
- char的越界赋值即其原理剖析
思考: int ch = 'A'; int ch1 = 65; int ch2 = 321; printf("%c %c %c\n", ch, ch1, ch2);的输出结果是什么 ...
- 如何解决Visual Studio 2017 运行后控制台窗口一闪就消失了
出现这种情况的原因 安装使用Visual Studio 2017 后,用Ctrl+F5运行程序,结果控制台窗口一闪就没了,也没有出现"press any key to continue-&q ...
- 几种常见布局的flex写法
flex布局目前基本上兼容主流的浏览器,且实现方式简单.我整理了flex的一些知识点,并且总结归纳了几种常见布局的flex写法 flex基础知识点 flex-grow和flex-shrink相关计算 ...
- task0002(四)- 练习:数据处理、轮播及交互
转载自我的个人博客 欢迎大家批评指正 包括5部分: 小练习1-处理用户输入 小练习2-日期对象的使用 小练习3:轮播图 小练习4:输入提示框 小练习5:界面拖拽交互 源码地址task0002 在线De ...
- SQL Server中如何让SQL语句对字符串大小写敏感
在SQL Server中默认对大小写是不敏感的,例如fname='peter'和fname='PETER'结果是一样的.但有时候用户会要求区分大小写,如验证密码等.这种情况下的处理办法就是在字段后加上 ...
- js,nodejs如何判断文件是什么编码格式
nodejs编码只支持utf8的编码方式,无论是打开某个文件或者写.js脚本都得以utf8的编码方式保存,不然程序无法运行,读出来的文件是乱码. 如果是在前台,读取文件是通过FileReader或者F ...
- linux权限问题,chmod命令
Linux系统中,每个用户的角色和权限划分的很细致也很严格,每个文件(目录)都设有访问许可权限,利用这种机制来决定某个用户通过某种方式对文件(目录)进行读.写.执行等操作. 操作文件或目录的用户,有3 ...
- php实验一专属跳转博文
今天完成了php关于设计个人博客主页的实验一作业. 这是php实验一作业中博客的跳转链接页.
- JavaWeb学习day6-Response初学2(生成随机数验证码)
1 public class imageServlet extends HttpServlet { 2 @Override 3 protected void doGet(HttpServletRequ ...