我正在尝试安装python软件包pmock
使用以下命令:

sudo pip install pmock


但是,我得到以下错误:

Collecting pmock
  Getting page https://pypi.python.org/simple/pmock/

  Could not find a version that satisfies the requirement pmock (from versions: )
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pmock to allow).
Cleaning up...
No matching distribution found for pmock


使用pip安装python软件包的正确方法是什么?

最佳答案

这是通过pip安装产生的常见问题之一,通常django安装程序在通过requirements.txt设置环境时也会引发此错误。基本解决方案是也允许外部和未经验证的选项

以这种方式尝试外部托管文件:

sudo pip install pmock --allow-external pmock --allow-unverified pmock

10-07 15:15