mac 安装reportlab工具

1.安装pip

$sudo easy_install pip

2.安装reportlab:

$pip install rlextra -i https://www.reportlab.com/pypi/

Downloading/unpacking rlextra
User for www.reportlab.com: test@example.com
Password: your password
  Downloading rlextra-3.1.9.tar.gz (8.4MB): 7.9MB downloaded
  ...etc...

在安装这个的时候出了点error,
于是,直接安装:

$sudo easy_install reportlab

等到安装成功后,进入python,然后测试:

>>> import reportlab

如果没有安装成功,这里就会报错,安装正确的话,程序可以继续运行。

查看安装路径:

>>>import sys
>>>print sys.path

显示:

[”, ‘/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg’, ‘/Library/Python/2.7/site-packages/reportlab-3.3.0-py2.7-macosx-10.11-intel.egg’, ‘/Library/Python/2.7/site-packages/setuptools-23.0.0-py2.7.egg’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload’, ‘/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC’, ‘/Library/Python/2.7/site-packages’]

给一个官方的参考网址:
http://www.reportlab.com/reportlabplus/installation/

你可能感兴趣的:(python,reportlab)