问题描述
我尝试在virtualenv中安装pycairo
以在Django项目中使用.我已经运行了pip install pycairo==1.10.0
命令,该命令找到了软件包并下载了它,而与pip install pycairo
等其他命令不同,但是当开始安装软件包时,它会引发错误.
I've tried to install pycairo
in a virtualenv to use in a Django project. I've ran the pip install pycairo==1.10.0
command which finds the package and downloads it unlike other commands like pip install pycairo
, etc. but when starting to install the package it throws an error.
这是日志:
Downloading/unpacking pycairo==1.10.0
Running setup.py egg_info for package pycairo
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory:
'/home/radu/Desktop/djangos/workout/venv/build/pycairo/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory:
'/home/radu/Desktop/djangos/workout/venv/build/pycairo/setup.py'
----------------------------------------
Command python setup.py egg_info failed with error code 1 in
/home/radu/Desktop/djangos/workout/venv/build/pycairo
Storing complete log in /home/radu/.pip/pip.log
您能给我一些有关做什么的提示吗?我应该尝试为该软件包编写一个setup.py文件,然后尝试安装它吗? (我不确定这是否是解决方案,我仍在努力弄清楚我能做什么).
Could you please give me any hints about what to do? Should I try and write a setup.py file for the package and then try to install it? (i'm not sure it's even a solution, i still am trying to figure out what I can do).
提前谢谢!
推荐答案
大家好消息!
我刚刚发布了cairocffi: http://packages.python.org/cairocffi/
I just released cairocffi:http://packages.python.org/cairocffi/
它是pycairo的替代产品,它在virtualenv中安装了pip,可在Python 2和3以及PyPy上运行.
It’s a replacement for pycairo that installs with pip in a virtualenv, runs on Python 2 and 3, as well as PyPy.
pip install cairocffi
在您的代码中:
import cairocffi as cairo
# Enjoy the same API as Pycairo.
欢迎反馈. (尽管问题跟踪器可能比这里更好.)
Feedback welcome. (Although the issue tracker might be a better channel than here.)
这篇关于在virtualenv中安装pycairo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!