我正在尝试安装Pycairo 1.10.0,以便与我自定义构建的Python 3.1一起使用。然而,
我理解这句话是在告诉我应该:
或类似方式; 然而,这会导致以下错误:
我确实有一个文件
sudo /flower/bin/easy_install-3.1 pycairo
出现错误:
XXX@XXXX:/adventures$ sudo /flower/bin/easy_install-3.1 pycairo
install_dir /flower/lib/python3.1/site-packages/
Searching for pycairo
Reading http://pypi.python.org/simple/pycairo/
Reading http://cairographics.org/pycairo
Best match: pycairo 1.10.0
Downloading http://cairographics.org/releases/pycairo-1.10.0.tar.bz2
Processing pycairo-1.10.0.tar.bz2
error: Couldn't find a setup script in /tmp/easy_install-zeG9HB/pycairo-1.10.0.tar.bz2
实际上,在该下载文件中并没有 setup.py
文件;相反,INSTALL
说明如下:
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.
Testing
-------
See test/README
我理解这句话是在告诉我应该:
sudo /flower/bin/python3.1 ./waf configure --prefix=/flower/pycairo/
或类似方式; 然而,这会导致以下错误:
./options()
Setting top to : /tmp/pycairo-1.10.0
Setting out to : /tmp/pycairo-1.10.0/build_directory
./configure()
Checking for 'gcc' (c compiler) : ok
Checking for program python : /usr/bin/python
python executable '/usr/bin/python' different from sys.executable '/flower/bin/python3.1'
Checking for python version : (2, 6, 5, 'final', 0)
The python version is too old, expecting (3, 1, 0)
所以我查看了源代码,似乎没有办法告诉这个“waf”工具目标Python版本就是运行它自己的版本,因此我摸索了一番并达到了这个程度:
waf
Checking for 'gcc' (c compiler) : ok
Checking for program python : /usr/bin/python
#############293 /flower/bin/python3.1
Checking for python version : (3, 1, 2, 'final', 0)
Checking for library python3.1 in LIBDIR : yes
Checking for program python3.1-config : not found
Checking for program python-config-3.1 : not found
Checking for header Python.h : Could not find the python development headers
Checking for [] : not found
The configuration failed
我确实有一个文件
/flower/bin/python3.1-config
,所以我不明白。处理所有这些的Python代码相当难。有什么建议吗?是否有适用于pycairo + python 3的*.deb
或类似包可供使用?找不到任何信息。