gpt4 book ai didi

python - "pip install line_profiler"失败

转载 作者:太空狗 更新时间:2023-10-29 20:15:41 25 4
gpt4 key购买 nike

我打字

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com