无法在Qt控制台中使用pip安装“ line_profiler”

时间:2019-06-07 07:51:16

标签: python python-3.x macos qtconsole line-profiler

当我尝试使用QTconsole安装“ line_profiler”

!pip install line_profiler

但是失败了, “ Line-Profiler的构建车轮失败”。

我不知道为什么会这样。有什么方法可以在QTconsole中成功安装“ line_profiler”吗?

1 个答案:

答案 0 :(得分:0)

这是因为line_profiler软件包是Last released: Dec 20, 2017

在github上的描述中也有说明:"As of version 2.1.2, pip install line_profiler does not work"。另外还有相应的安装说明:

git clone https://github.com/rkern/line_profiler.git
find line_profiler -name '*.pyx' -exec cython {} \;
cd line_profiler
pip install . --user