我试图让reportlab在Jython (2.5.2)下运行,但它未能安装:
$ easy_install reportlab
Searching for reportlab>=2.4
Reading http://pypi.python.org/simple/reportlab/
Reading http://www.reportlab.com/
Best match: reportlab 2.5
Downloading http://pypi.python.org/packages/source/r/reportlab/reportlab-2.5.tar.gz#md5=cdf8b87a6cf1501de1b0a8d341a217d3
Processing reportlab-2.5.tar.gz
Running reportlab-2.5/setup.py -q bdist_egg --dist-dir /var/folders/04/nrrmlfvx05l43fj6rljc2z400000gq/T/easy_install-x2cwzJ/reportlab-2.5/egg-dist-tmp-D_S74b
################################################
#Attempting install of _rl_accel, sgmlop & pyHnj
#extensions from '/private/var/folders/04/nrrmlfvx05l43fj6rljc2z400000gq/T/easy_install-x2cwzJ/reportlab-2.5/src/rl_addons/rl_accel'
################################################
################################################
#Attempting install of _renderPM
#extensions from '/private/var/folders/04/nrrmlfvx05l43fj6rljc2z400000gq/T/easy_install-x2cwzJ/reportlab-2.5/src/rl_addons/renderPM'
# installing without freetype no ttf, sorry!
# You need to install a static library version of the freetype2 software
# If you need truetype support in renderPM
# You may need to edit setup.cfg (win32)
# or edit this file to access the library if it is installed
################################################
Downloading standard T1 font curves
Finished download of standard T1 font curves
error: Setup script exited with error: Compiling extensions is not supported on Jython当setup.py试图安装renderPM扩展时,似乎会发生错误。有没有一种没有renderPM扩展来安装reportlab的方法?
发布于 2012-07-16 01:16:10
通过这样做,我可以安装它(甚至看起来也很有效):
curl -O http://pypi.python.org/packages/source/r/reportlab/reportlab-2.5.tar.gz
tar zxf reportlab-2.5.tar.gz
cd reportlab*
rm -rf src/rl_addons
jython setup.py install基本上,这将删除本机扩展,而安装程序似乎并不介意这些扩展(虽然它会打印警告)。
发布于 2012-07-15 17:05:34
Jython不能使用任何需要c++扩展的模块。
来自reportlab先决条件页面
的相关版本下载并安装Python图像库。
哎哟,PIL是jython的节目阻止器。
你的选择是
对于后者,我取得了很好的成功,因为无论您将来是从哪种语言工作,学习的XML始终是一个有效的选择。
https://stackoverflow.com/questions/11489975
复制相似问题