Mac OS X 10.7.5 Python 2.7 Reportlab 2.6
尝试调用reportlab中的子模块时,我的输入错误很好:
> Traceback (most recent call last): File "reportlab.py", line 1, in
> <module>
> import reportlab File "/Users/maggielee/Documents/pythons/reportlab.py", line 2, in <module>
> from reportlab.graphics.shapes import Drawing, String ImportError: No module named graphics.shapes
:(我很确定reportlab.graphics就在那里。 作为一个菜鸟,我不能嵌入一个图像,但在这里,它是... site-packages,和beautifulsoup等人一样:
https://docs.google.com/open?id=0B-ZMst96R_MYUENKR0FjcFJjaG8
这是我尝试的步骤: python setup.py install
> ...
> ########## SUMMARY INFO #########
> ################################################
> #Attempting install of _rl_accel, sgmlop & pyHnj
> #extensions from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/reportlab-2.6/src/rl_addons/rl_accel'
> ################################################
> ################################################
> #Attempting install of _renderPM
> #extensions from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site->packages/reportlab-2.6/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
> ################################################ Standard T1 font curves already downloaded
是的,好的,我不知道这意味着什么,所以让我们试试: python setup.py tests
然后它通过一些测试进行搅拌,详细说明一些错误并告诉我(失败= 1错误= 6)
所以,让我们试试吧 easy_install reportlab
结果:
> Searching for reportlab Best match: reportlab 2.6 Adding reportlab 2.6
> to easy-install.pth file
>
> Using
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
> Processing dependencies for reportlab Finished processing dependencies
> for reportlab
很伤心,一直在与这场战斗,但我在黑暗中。任何想法?