我输入
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
状态,没有稳定的软件包版本。换句话说,软件包PyPI页面beta
上只有软件包版本链接。如您所见,看到它:pip
Could not find a version that satisfies the requirement line-profiler (from versions: 1.0b1, 1.0b2, 1.0b3)
根据“预发行版本”文档页面:
从v1.4开始,pip默认将仅安装PEP426指定的稳定版本。如果某个版本无法解析为兼容的PEP426版本,则假定该版本为预发行版本。
将--pre
参数传递给pip install
:
--pre
包括预发行和开发版本。默认情况下,pip仅查找稳定版本。
sudo pip install --pre line_profiler
或者,安装特定版本:
sudo pip install line_profiler==1.0b3
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句