我想安装该模块xlwings
,它的依赖项之一是appscript
. 所以当我这样做时:
pip3.6 install xlwings
我收到以下错误:
Collecting xlwings
Using cached https://files.pythonhosted.org/packages/f6/cf/c4e5ba995c6440fff3f6e846ba0aa92481d8d5c54c27860a324df525802b/xlwings-0.15.1.tar.gz
Requirement already satisfied: psutil>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from xlwings) (5.4.8)
Collecting appscript>=1.0.1 (from xlwings)
Using cached https://files.pythonhosted.org/packages/35/0b/0ad06b376b2119c6c02a6d214070c8528081ed868bf82853d4758bf942eb/appscript-1.0.1.tar.gz
Installing collected packages: appscript, xlwings
Running setup.py install for appscript ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-record-7kas7ahn/install-record.txt --single-version-externally-managed --compile:
running install
Distribution option extra_path is deprecated. See issue27919 for details.
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
copying appscript_3x/lib/mactypes.py -> build/lib.macosx-10.6-intel-3.6
copying appscript_3x/lib/osax.py -> build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemsend.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/findapp.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemconnect.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/typewrappers.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/__init__.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/kae.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemreference.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/aemcodecs.py -> build/lib.macosx-10.6-intel-3.6/aem
copying appscript_3x/lib/aem/mactypes.py -> build/lib.macosx-10.6-intel-3.6/aem
creating build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/keywordwrapper.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/__init__.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/referencerenderer.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/terminologyparser.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/reservedkeywords.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/reference.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/defaultterminology.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/terminology.py -> build/lib.macosx-10.6-intel-3.6/appscript
copying appscript_3x/lib/appscript/genericreference.py -> build/lib.macosx-10.6-intel-3.6/appscript
running build_ext
building 'aem.ae' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/appscript_3x
creating build/temp.macosx-10.6-intel-3.6/appscript_3x/ext
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c appscript_3x/ext/ae.c -o build/temp.macosx-10.6-intel-3.6/appscript_3x/ext/ae.o -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_4
In file included from appscript_3x/ext/ae.c:15:
In file included from appscript_3x/ext/ae.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:34:10: fatal error: 'CarbonSound/CarbonSound.h' file not found
#include <CarbonSound/CarbonSound.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-record-7kas7ahn/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/4m/q2rj8ww90ms0jwg7zv4ldwqh0000gn/T/pip-install-t_le314z/appscript/
我正在使用 Jupyter Notebook,并且该笔记本正在运行 Python 3.6,所以我想专门安装appscript
和xlwings
3.6。
我的操作系统是 macOS Mojave 10.14.1。
错误代码说问题出在clang,所以这是我的clang版本:
$clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
任何人都可以解释一下吗?