gpt4 book ai didi

python - 无法安装reportlab mac OS X 10.9.2 + python2.7

转载 作者:行者123 更新时间:2023-11-30 23:25:46 26 4
gpt4 key购买 nike

我正在努力使用 python 2.7 在 mac OS X 10.9.2 上安装 reportlab。我设法使用 pip3 安装它,即使我需要 python2.7,所以我相信我已经安装了所有必需的软件包。

你能帮忙吗?

这是安装日志(如果您需要完整的未剥离日志,请询问):

$>pip install reportlab
Downloading/unpacking reportlab
Downloading reportlab-3.0.tar.gz (1.9MB): 1.9MB downloaded
Running setup.py egg_info for package reportlab
################################################
#Attempting install of _rl_accel & pyHnj
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
################################################
################################################
#Attempting install of _renderPM
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
will use package libart 2.3.12
# installing with freetype version 21
################################################
Downloading standard T1 font curves
Finished download of standard T1 font curves

()
########## SUMMARY INFO #########
################################################
#Attempting install of _rl_accel & pyHnj
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
################################################
################################################
#Attempting install of _renderPM
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
will use package libart 2.3.12
# installing with freetype version 21
################################################
Downloading standard T1 font curves
Finished download of standard T1 font curves
Installing collected packages: reportlab
Running setup.py install for reportlab
################################################
#Attempting install of _rl_accel & pyHnj
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'
################################################
################################################
#Attempting install of _renderPM
#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'
will use package libart 2.3.12
# installing with freetype version 21
################################################
Standard T1 font curves already downloaded
building 'reportlab.lib._rl_accel' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip_build_root/reportlab/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xduBeA-record/install-record.txt --single-version-externally-managed:
################################################

#Attempting install of _rl_accel & pyHnj

#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel'

################################################

################################################

#Attempting install of _renderPM

#extensions from '/private/tmp/pip_build_root/reportlab/src/rl_addons/renderPM'

will use package libart 2.3.12

# installing with freetype version 21

################################################

Standard T1 font curves already downloaded

running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-intel-2.7

creating build/lib.macosx-10.9-intel-2.7/reportlab

copying src/reportlab/__init__.py -> build/lib.macosx-10.9-intel-2.7/reportlab

copying src/reportlab/rl_config.py -> build/lib.macosx-10.9-intel-2.7/reportlab

[...] -> lots of copying/creating lines stripped here for more clarity

running build_ext

creating build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-10.9-intel-2.7/private/tmp/pip_build_root/reportlab/src/rl_addons/rl_accel/_rl_accel.o

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip_build_root/reportlab/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Ty1Jj1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip_build_root/reportlab
Storing complete log in /Users/hugo/Library/Logs/pip.log

最佳答案

刚刚找到解决方案here 。只需在编译之前添加这些环境设置即可告诉 clang 忽略该错误。

export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments

希望能帮助别人!

关于python - 无法安装reportlab mac OS X 10.9.2 + python2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22824754/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com