如何为Python安装Cairo二进制文件 [英] How do I install Cairo binaries for Python

查看:106
本文介绍了如何为Python安装Cairo二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Windows中安装Python 2.7的Cairo.我已经安装了igraph. Christoph网站上有此系统的二进制文件.我已经下载了适当的二进制文件.如何使用pip安装Cairo二进制文件.

I am trying to install Cairo for Python 2.7 in windows. I have installed igraph. There are binaries for this system on Christoph's site. I have downloaded the appropriate binary. How do I use pip to install the Cairo binary.

推荐答案

我对此进行了研究并弄清楚了.这是详细的说明.它们可以正常工作(对任何二进制Python包进行适当的修改:

I worked on it and figured it out. Here are detailed instructions. They will work (with appropriate modifications for any binary Python package:

在Windows版Python中安装Cairo.

Installing Cairo in Python for Windows.

  1. 转到网站 https://www.lfd.uci.edu/~gohlke/pythonlibs/,克里斯多夫·戈尔克(Chrisoph Gohlke)的网站
  2. 将适当版本的Cairo下载到您的下载文件夹
  3. 将下载的文件从下载"文件夹移至c:\ Pythonxx \ Scripts(xx是Python版本)
  4. 打开命令窗口.不是Python命令窗口.
  5. 输入cd c:\ Pythonxx \ Scripts.系统会在该目录中为您提供命令行
  6. 输入: pip install download-file-name, 例如pycairo-1.10.0-cp27-none-win32.whl
  1. Go to site https://www.lfd.uci.edu/~gohlke/pythonlibs/, Chrisoph Gohlke’s site
  2. Download the appropriate version of Cairo to your Download folder
  3. Move the downloaded file from the Download folder to c:\Pythonxx\Scripts (xx is the version of Python)
  4. Open a command window. Not the Python command window.
  5. Enter cd c:\Pythonxx\Scripts. The system will give you a command line in that directory
  6. Enter: pip install downloaded-file-name, for example pycairo-1.10.0-cp27-none-win32.whl

这篇关于如何为Python安装Cairo二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆