Python pip bdist_wheel error

python新手,在安装python环境,跑系统的时候总是安装不成功,报错(见下面),总是找不到原因,最后只能仔细看报错日志,终于找到了一个熟悉的字符:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

果断google,找到原因,切出虚拟环境,在mac 终端中输入

xcode-select --install

回车执行,等待安装成功。然后重新在虚拟环境安装各个依赖包,成功。

 

Building wheel for ujson (setup.py) ... error

  ERROR: Complete output from command /usr/local/work/python/venvs/venv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/r6/4jgxylx12zscvcps6j_330gr0000gn/T/pip-install-R3YQzb/ujson/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/r6/4jgxylx12zscvcps6j_330gr0000gn/T/pip-wheel-th00LL --python-tag cp27:

  ERROR: running bdist_wheel

  running build

  running build_ext

  building 'ujson' extension

  creating build

  creating build/temp.macosx-10.14-intel-2.7

  creating build/temp.macosx-10.14-intel-2.7/python

  creating build/temp.macosx-10.14-intel-2.7/lib

  cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I./python -I./lib -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c ./python/ujson.c -o build/temp.macosx-10.14-intel-2.7/./python/ujson.o -D_GNU_SOURCE

  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  error: command 'cc' failed with exit status 1

  ----------------------------------------

  ERROR: Failed building wheel for ujson

  Running setup.py clean for ujson

Failed to build ujson

Installing collected packages: ujson

  Running setup.py install for ujson ... error

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值