gpt4 book ai didi

Python 3.6模块appscript安装错误

转载 作者:太空宇宙 更新时间:2023-11-03 21:26:37 29 4
gpt4 key购买 nike

我想安装模块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,因此我想在 3.6 上专门安装 appscriptxlwings

我的操作系统是 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

有人可以透露一些信息吗? ??

最佳答案

更新:
appscript 包现在可以作为 pypi 的二进制轮子使用。只需再次执行 pip install appscriptpip install xlwings 即可。

上一个答案:

确保在使用 pip 安装时安装了 XCode 命令行工具,如 http://docs.xlwings.org/en/stable/installation.html#dependencies 中所述。

如果您想让事情变得更简单,请使用 Anaconda 发行版:它不需要 XCode 命令行工具。

关于Python 3.6模块appscript安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53799014/

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