安装ReportLab

问题描述 投票:0回答:1

我正在尝试使用 PyCharm Preferences -> Project Interpreter -> 从可用包中添加新包来安装 ReportLab 我还尝试了终端(pip) 但我收到以下错误:

$ pip install reportlab


Collecting reportlab
Using cached reportlab-3.2.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pillow>=2.4.0 in /Library/Python/2.7/site-packages (from reportlab)
Requirement already satisfied (use --upgrade to upgrade): pip>=1.4.1 in /Library/Python/2.7/site-packages (from reportlab) 
Collecting setuptools>=2.2 (from reportlab) 
     Downloading setuptools-19.6-py2.py3-none-any.whl (472kB) 100% |████████████████████████████████| 475kB 940kB/s  
Installing collected packages: setuptools, reportlab 
  Found existing installation: setuptools 1.1.6
     Uninstalling setuptools-1.1.6:

Exception: 
Traceback (most recent call last): 
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args) 
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 725, in install
requirement.uninstall(auto_confirm=True) 
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 752, in uninstall
paths_to_remove.remove(auto_confirm) 
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path) 
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 266, in renames
shutil.move(old, new) 
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
copytree(src, real_dst, symlinks=True) 
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors

Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/b_/cqps_v114gb4yv_b44t9_sx00000gn/T/pip-am3FUX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

我无法定义问题。 非常感谢。

python python-2.7 reportlab
1个回答
0
投票

尝试

sudo -H pip install reportlab --ignore-installed setuptools-1.1.6

© www.soinside.com 2019 - 2024. All rights reserved.