在运行pip安装时,我会收到如下错误:
$ pip install pycairo
Downloading/unpacking pycairo
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files.
Downloading pycairo-1.10.0.tar.bz2 (246kB): 246kB downloaded
Running setup.py egg_info for package pycairo
Traceback (most recent call last):
File "<string>", line 16, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/home/naught101/.virtualenvs/virtualenv-3/build/pycairo/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/home/naught101/.virtualenvs/virtualenv-3/build/pycairo/setup.py'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/naught101/.virtualenvs/virtualenv-3/build/pycairo
Storing complete log in /home/naught101/.pip/pip.log这是发生在皮凯罗,小口。
$ pip --version
pip 1.4.1 from /home/naught101/.virtualenvs/virtualenv-3/lib/python3.3/site-packages (python 3.3)发布于 2013-10-01 23:57:10
pycairo不是由setuptools构建的,因此不能由pip安装。
正如安装文档所述:
Install Procedure
-----------------
$ ./waf --help # shows available waf options
$ ./waf configure # use --prefix and --libdir if necessary
# --prefix=/usr --libdir=/usr/lib64 for Fedora 64-bit
$ ./waf build
$ ./waf install
Use
$ python3 ./waf ...
if you have python2 and python3 installed, and the default is python 2.您仍然可以使用pip来获取它:
$ pip install --download=. pycairo
Downloading/unpacking pycairo
Downloading pycairo-1.10.0.tar.bz2 (246kB): 246kB downloaded
$ tar xf pycairo-1.10.0.tar.bz2
$ cd pycairo-1.10.0
$ python ./waf etc.只需确保您从虚拟环境中使用Python,并将正确的选项传递给configure命令(--prefix=$VIRTUAL_ENV应该足够了,但不要引用我的话;您可能还必须将PYTHON环境变量设置为您的虚拟化Python的路径或其他东西)。
另一种选择是使用开罗绑定的另一组,如cairocffi。但这显然是一个很大的变化,这可能是不合适的。
https://stackoverflow.com/questions/19127874
复制相似问题