- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我打字
sudo pip install "line_profiler"
我明白了
Downloading/unpacking line-profiler
Could not find a version that satisfies the requirement line-profiler (from versions: 1.0b1, 1.0b2, 1.0b3)
Cleaning up...
No distributions matching the version for line-profiler
Storing debug log for failure in /home/milia/.pip/pip.log
当我使用搜索 line_profile 时
sudo pip search "line_profiler"
我得到:
django-debug-toolbar-line-profiler - A panel for django-debug-toolbar that integrates
information from line_profiler
line_profiler - Line-by-line profiler.
tracerbullet - A line-by-line profiler that doesn't suck.
不知何故下划线变成了“-”。我怎样才能绕过它?
最佳答案
问题不在于 pip
将 _
转换为 -
以满足包命名要求,而在于:该软件包处于 beta
状态,没有稳定的软件包版本。换句话说,package PyPI page 上只有 beta
包版本链接可用。 .如您所见,pip
看到了它:
Could not find a version that satisfies the requirement line-profiler (from versions: 1.0b1, 1.0b2, 1.0b3)
根据Pre-release Versions文档页面:
Starting with v1.4, pip will only install stable versions as specified by PEP426 by default. If a version cannot be parsed as a compliant PEP426 version then it is assumed to be a pre-release.
通过 --pre
pip install
的参数:
--pre
Include pre-release and development versions. By default, pip only finds stable versions.
sudo pip install --pre line_profiler
或者,安装特定版本:
sudo pip install line_profiler==1.0b3
关于python - "pip install line_profiler"失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24215492/
嗨,我是 Python 新手程序员。我想要逐行分析,因此尝试安装 line_profiler 包。但它不起作用。这是我所做的: 顺便说一下,我使用的是 64 位 Windows 8.1,并且正在使用
我已经使用 pip install line_profiler 安装了 line_profiler。我在 Mac OSX 10.8.5 上使用 Python 2.7。 我运行 kernprof -l
尝试将 line_profiler 用作 API。正在关注their docs和 this tutorial (向下滚动到行分析),我得到了一个用于分析一些 numpy ufunc 的极简测试用例:
我知道这是我的安装失败,我很抱歉把这个无趣且无关紧要的问题放在你的脚下,但对于我来说,我无法弄清楚出了什么问题并且我已经没有想法了。我希望有人能够快速指出显而易见的问题。 我正在尝试分析一个 pyth
我想知道如何运行 Python 的 line_profiler以 this question 的答案中给出的格式逐行执行时间. 我安装了模块并如下调用其 LineProfiler 对象,但我得到的输出
我正在尝试在 python 中进行线路配置文件和内存配置文件。我通过导入 line_profiler从 line_profiler 导入 LineProfiler当我运行我的代码时,我收到错误消息:M
我只找到了相关的帖子,但看起来它不适用于此处。我正在遵循 Python 优化指南 Profiling and Optimizing Jupyter Notebooks - A Comprehensiv
所以我尝试使用 line_profiler 在我自己的 python 脚本中分析一个函数,因为我想要逐行计时。唯一的问题是该函数是 Cython 函数,并且 line_profiler 无法正常工作。
我打字 sudo pip install "line_profiler" 我明白了 Downloading/unpacking line-profiler Could not find a ver
基于对 this question 的回答我正在尝试使用 line_profiler具有 cythonized 功能。 关于上述问题,接受的答案为我们提供了一个关于如何将其与 jupyter note
我尝试使用 line_profiler 模块来获取 Python 文件的逐行配置文件。这是我到目前为止所做的: 1) 从 pypi 安装 line_profiler通过使用 .exe 文件(我在 Wi
我已经用 确定了一些长期运行的 pytest 测试 py.test --durations=10 我现在想用 line_profiler 或 cprofile 之类的东西来检测其中一个测试。我真的很想
使用 Ubuntu 14.04.5 LTS。尝试使用 sudo pip3 install line_profiler 安装 line_profiler,现在当我运行 sudo pip3 时,我得到以下
我正在尝试使用 line_profiler 模块分析一些 Python 代码,但我无法让它工作。我在 Windows 7 上使用 Python 2.7.6。 在以下 test.py 文件上运行 ker
我想用优秀的line_profiler ,但只是在某些时候。为了让它工作,我添加了 @profile 在每个函数调用之前,例如 @profile def myFunc(args): blah
运行 kernprof 时: kernprof -l script_to_profile.py 输出存储在二进制文件中,可以在终端/命令行中读取。 有没有办法将结果输出到文本文件? 这似乎是一个有用的
问题 大多数 iPython “魔术函数”对我来说都能很好地工作:%hist、%time、%prun 等。但是,我注意到 %lprun 在我最初安装的 iPython 中找不到。 尝试解决 然后我发现
我是一名优秀的程序员,十分优秀!