I型
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.不知何故,下划线变成了"-“。我怎么能绕过它?
发布于 2014-06-14 00:47:28
问题不在于pip将_转换为-以满足包命名要求,而是在于:包处于beta状态,没有稳定的包版本。换句话说,在beta上只有可用的包PyPI页面包版本链接。正如您所看到的,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发布于 2018-11-20 00:16:56
我安装了miniconda并运行了以下代码:
$ conda install -c anaconda line_profiler
https://stackoverflow.com/questions/24215492
复制相似问题