thriftpy依赖安装问题

安装第三方库的时候,依赖于thriftpy,报错如下

Building wheel for thriftpy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /data/home/leonlai/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k4muxat_/thriftpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k4muxat_/thriftpy/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 /tmp/pip-wheel-dv6bo4tx
       cwd: /tmp/pip-install-k4muxat_/thriftpy/
  Complete output (125 lines):
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/_compat.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/hook.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/rpc.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/server.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/thrift.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/tornado.py -> build/lib.linux-x86_64-3.8/thriftpy
  copying thriftpy/utils.py -> build/lib.linux-x86_64-3.8/thriftpy
  creating build/lib.linux-x86_64-3.8/thriftpy/contrib
  copying thriftpy/contrib/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/contrib
  creating build/lib.linux-x86_64-3.8/thriftpy/parser
  copying thriftpy/parser/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/parser
  copying thriftpy/parser/exc.py -> build/lib.linux-x86_64-3.8/thriftpy/parser
  copying thriftpy/parser/lexer.py -> build/lib.linux-x86_64-3.8/thriftpy/parser
  copying thriftpy/parser/parser.py -> build/lib.linux-x86_64-3.8/thriftpy/parser
  creating build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/binary.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/compact.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/exc.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/json.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  copying thriftpy/protocol/multiplex.py -> build/lib.linux-x86_64-3.8/thriftpy/protocol
  creating build/lib.linux-x86_64-3.8/thriftpy/transport
  copying thriftpy/transport/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/transport
  copying thriftpy/transport/_ssl.py -> build/lib.linux-x86_64-3.8/thriftpy/transport
  copying thriftpy/transport/socket.py -> build/lib.linux-x86_64-3.8/thriftpy/transport
  copying thriftpy/transport/sslsocket.py -> build/lib.linux-x86_64-3.8/thriftpy/transport
  creating build/lib.linux-x86_64-3.8/thriftpy/contrib/tracking
  copying thriftpy/contrib/tracking/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/contrib/tracking
  copying thriftpy/contrib/tracking/tracker.py -> build/lib.linux-x86_64-3.8/thriftpy/contrib/tracking
  creating build/lib.linux-x86_64-3.8/thriftpy/transport/buffered
  copying thriftpy/transport/buffered/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/transport/buffered
  creating build/lib.linux-x86_64-3.8/thriftpy/transport/framed
  copying thriftpy/transport/framed/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/transport/framed
  creating build/lib.linux-x86_64-3.8/thriftpy/transport/memory
  copying thriftpy/transport/memory/__init__.py -> build/lib.linux-x86_64-3.8/thriftpy/transport/memory
  copying thriftpy/contrib/tracking/tracking.thrift -> build/lib.linux-x86_64-3.8/thriftpy/contrib/tracking
  running build_ext
  building 'thriftpy.transport.cybase' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/thriftpy
  creating build/temp.linux-x86_64-3.8/thriftpy/transport
  gcc -pthread -B /data/home/leonlai/miniconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/data/home/leonlai/miniconda3/include/python3.8 -c thriftpy/transport/cybase.c -o build/temp.linux-x86_64-3.8/thriftpy/transport/cybase.o
  thriftpy/transport/cybase.c: In function 'PyInit_cybase':
  thriftpy/transport/cybase.c:2691:3: warning: 'tp_print' is deprecated (declared at /data/home/leonlai/miniconda3/include/python3.8/cpython/object.h:260) [-Wdeprecated-declarations]
     __pyx_type_8thriftpy_9transport_6cybase_TCyBuffer.tp_print = 0;
     ^
  thriftpy/transport/cybase.c:2701:3: warning: 'tp_print' is deprecated (declared at /data/home/leonlai/miniconda3/include/python3.8/cpython/object.h:260) [-Wdeprecated-declarations]
     __pyx_type_8thriftpy_9transport_6cybase_CyTransportBase.tp_print = 0;
     ^
  thriftpy/transport/cybase.c: In function '__Pyx__GetException':
  thriftpy/transport/cybase.c:3127:22: error: 'PyThreadState' has no member named 'exc_type'
       tmp_type = tstate->exc_type;
                        ^
  thriftpy/transport/cybase.c:3128:23: error: 'PyThreadState' has no member named 'exc_value'
       tmp_value = tstate->exc_value;
                         ^
  thriftpy/transport/cybase.c:3129:20: error: 'PyThreadState' has no member named 'exc_traceback'
       tmp_tb = tstate->exc_traceback;
                      ^
  thriftpy/transport/cybase.c:3130:11: error: 'PyThreadState' has no member named 'exc_type'
       tstate->exc_type = local_type;
             ^
  thriftpy/transport/cybase.c:3131:11: error: 'PyThreadState' has no member named 'exc_value'
       tstate->exc_value = local_value;
             ^
  thriftpy/transport/cybase.c:3132:11: error: 'PyThreadState' has no member named 'exc_traceback'
       tstate->exc_traceback = local_tb;
             ^
  thriftpy/transport/cybase.c: In function '__Pyx__ExceptionSwap':
  thriftpy/transport/cybase.c:3154:22: error: 'PyThreadState' has no member named 'exc_type'
       tmp_type = tstate->exc_type;
                        ^
  thriftpy/transport/cybase.c:3155:23: error: 'PyThreadState' has no member named 'exc_value'
       tmp_value = tstate->exc_value;
                         ^
  thriftpy/transport/cybase.c:3156:20: error: 'PyThreadState' has no member named 'exc_traceback'
       tmp_tb = tstate->exc_traceback;
                      ^
  thriftpy/transport/cybase.c:3157:11: error: 'PyThreadState' has no member named 'exc_type'
       tstate->exc_type = *type;
             ^
  thriftpy/transport/cybase.c:3158:11: error: 'PyThreadState' has no member named 'exc_value'
       tstate->exc_value = *value;
             ^
  thriftpy/transport/cybase.c:3159:11: error: 'PyThreadState' has no member named 'exc_traceback'
       tstate->exc_traceback = *tb;
             ^
  thriftpy/transport/cybase.c: In function '__Pyx__ExceptionSave':
  thriftpy/transport/cybase.c:3178:19: error: 'PyThreadState' has no member named 'exc_type'
       *type = tstate->exc_type;
                     ^
  thriftpy/transport/cybase.c:3179:20: error: 'PyThreadState' has no member named 'exc_value'
       *value = tstate->exc_value;
                      ^
  thriftpy/transport/cybase.c:3180:17: error: 'PyThreadState' has no member named 'exc_traceback'
       *tb = tstate->exc_traceback;
                   ^
  thriftpy/transport/cybase.c: In function '__Pyx__ExceptionReset':
  thriftpy/transport/cybase.c:3187:22: error: 'PyThreadState' has no member named 'exc_type'
       tmp_type = tstate->exc_type;
                        ^
  thriftpy/transport/cybase.c:3188:23: error: 'PyThreadState' has no member named 'exc_value'
       tmp_value = tstate->exc_value;
                         ^
  thriftpy/transport/cybase.c:3189:20: error: 'PyThreadState' has no member named 'exc_traceback'
       tmp_tb = tstate->exc_traceback;
                      ^
  thriftpy/transport/cybase.c:3190:11: error: 'PyThreadState' has no member named 'exc_type'
       tstate->exc_type = type;
             ^
  thriftpy/transport/cybase.c:3191:11: error: 'PyThreadState' has no member named 'exc_value'
       tstate->exc_value = value;
             ^
  thriftpy/transport/cybase.c:3192:11: error: 'PyThreadState' has no member named 'exc_traceback'
       tstate->exc_traceback = tb;
             ^
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for thriftpy

解决方法

执行pip install命令,可能一次还不行,要执行两次!

pip install cython thriftpy 

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值