美文网首页
WSL安装line-profiler

WSL安装line-profiler

作者: 小小朱大荔 | 来源:发表于2019-05-18 01:08 被阅读0次

pip install line-profiler若遇到如下错误:

  _line_profiler.c: In function ‘__Pyx__ExceptionSave’:
  _line_profiler.c:7890:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
       *type = tstate->exc_type;
                       ^~~~~~~~
                       curexc_type

    _line_profiler.c:7964:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = local_tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/home/user/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-a20b3hu6/line-profiler/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-bmeew5ig/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-a20b3hu6/line-profiler/

参考Build from pypi fails for Python3.7 #127
执行:pip install Cython git+https://github.com/rkern/line_profiler.git

相关文章

网友评论

      本文标题:WSL安装line-profiler

      本文链接:https://www.haomeiwen.com/subject/dmxgaqtx.html