python - 如何在 mac 终端上正确下载 Python 模块(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”导入setuptools,tokenize;file ='/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" 失败,错误代码 1 在 /private/var/folders/b_/kf3zc0xx3f51rbjcj5gcd9lh0000gn/T/pip-安装-qo2pickz/psutil/
我对终端一无所知,但愿意学习。你有什么建议吗?提前致谢!
解决方案
推荐阅读
- django - Django Annotations - 更有效的方法?
- javascript - 如何将我的椭圆曲线公钥编码为更易读的地址并解码回公钥
- javascript - 电子检测全局滚动事件mac
- php - WooCommerce:如何在挂钩操作中排除特定页面
- json - 在 Wordpress 站点中共享可通过 API 密钥访问的 .JSON 文件
- pytorch - 当 BucketIterator 构造函数的 data 参数是 Dataset 时如何迭代 BucketIterator 实例?
- c++ - 在编译时将参数包转换为数组的简单方法
- function - 使用 VueJS 在 while 循环中更新数据
- polygon - 将边界框与光栅包一起使用
- python - 错误为:-ModuleNotFoundError:在 docker 中运行 Pyspark 时没有名为“pyspark”的模块