我的机器上的pip freeze输出包括以下奇数行:
command-not-found==0.2.44当我试图在另一台机器上安装需求时,我得到了明显的No distributions at all found for command-not-found==0.2.44。这是一个pip错误吗?或者是否有真正的那个名称的python包,在pypi中是不存在的。
发布于 2014-03-27 01:00:20
实际上,正如后续注释中提到的,Ubuntu有一个python包,通过dpkg/apt安装,称为"python-commandnotfound“。
$apt-cache search command-not-found
command-not-found - Suggest installation of packages in interactive bash sessions
command-not-found-data - Set of data files for command-not-found.
python-commandnotfound - Python 2 bindings for command-not-found.
python3-commandnotfound - Python 3 bindings for command-not-found.由于这是通过apt提供的,并且在pypi回购中不可用,所以您将无法通过pip安装它,但是pip将看到它已经安装。为了显示已安装的软件包,pip并不关心是否通过apt、easy_install、pip、手动等方式安装包。
简而言之,如果您确实需要在另一个主机上使用它(我假设您不需要),那么您将需要apt-get install python-commandnotfound。
https://stackoverflow.com/questions/22300551
复制相似问题