python - django操作系统错误: no library called "cairo" was found on windows

标签 python windows pip cairo pycairo

当我运行 Django 服务器时,我看到这个问题!!

OSError: no library called "cairo" was found

no library called "libcairo-2" was found

cannot load library 'libcairo.so': error 0x7e

cannot load library 'libcairo.2.dylib': error 0x

cannot load library 'libcairo-2.dll': error 0x7e

最佳答案

安装 GTK+ 对我来说不起作用。 我使用 UniConverter2.0 解决了这个问题。 我的环境是

  • Python 3.7
  • Windows 10 x64
  1. 安装uniconvertor-2.0rc4-win64_headless.msi ,
  2. 找到UniConverter安装路径下的“dll”子目录。(在我的例子中,C:\Program Files\UniConvertor-2.0rc4\dlls)
  3. 将此“dll”路径添加到系统路径。
  4. 关闭 VSCode 并重新打开项目。
  5. 尝试再次运行服务器。 享受吧!

关于python - django操作系统错误: no library called "cairo" was found on windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59481394/

相关文章:

python - 如何使用 pyqgis 在形状文件中添加特征?

vb.net - Windows 下拉菜单将文件名传递给 vb.net 程序

linux - 在 Windows 上托管 docker 虚拟机时,是否可以配置 docker-nvidia 以与 tensorflow-serving 一起使用?

python - 在 Windows 7 x86 上安装 turbogears 2.1 错误 "The system cannot find the file specified"

python - 在 Python 中计算数组并​​赋值

python - 如何在数据类中使用 field()?

python - Jupyter 说它安装了内核,但仍然不可用

python - 无法在 python 3.5 上安装 lxml

linux - 无法使用 pip 下载 mongo-connector

python - 使用 pip 或其他工具过滤搜索事件或成熟 PyPI 包的更简单方法?