如何在Mac终端上正确下载Python模块(xlwings)?

时间:2019-02-11 15:36:47

标签: python python-3.7 xlwings

我一直试图从终端安装xlwings模块(在python 3.7上)并出现一些错误。在最后一次尝试中,我到达了一个点,当我键入pip3 install xlwings时,我收到以下错误。

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=550 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1

命令“ /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c”导入设置工具,标记化; 文件 ='/ private / var / folders / b_ / kf3zc0xx3f51rbjcj5gcd9lh0000gn / T / pip-install-qo2pickz / psutil / 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/b_/kf3zc0xx3f51rbjcj5gcd9lh0000gn/T/pip-record-vpk41akr/install-record.txt --single-version-externally-managed --compile“在/ private / var / folders / b_ / kf3zc0xx3f51rbjhj5j中出现错误代码1失败T / pip-install-qo2pickz / psutil /

我对航站楼一无所知,但愿意学习。你有什么建议吗? 预先感谢!

1 个答案:

答案 0 :(得分:0)

我相信您需要下载并安装xcode开发人员工具(不需要完整的xcode安装)。它应该解决问题。有关更多详细信息,请参见this answer上的related question

相关问题