安装python包在md5中有问题

时间:2016-06-25 11:48:07

标签: python md5

我正在使用Windows,当我想要安装软件包时,我收到以下错误:

pip install django
Requirement already satisfied (use --upgrade to upgrade): django in c:\python27\lib\site-packages

C:\code\Djangotest\amar-e-simples-master>pip install django --upgrade
Collecting django
  Downloading Django-1.9.7-py2.py3-none-any.whl (6.6MB)
    6% |#                               | 399kB 3.3MB/s eta 0:00:02
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    django from https://pypi.python.org/packages/e6/f9/154e1460c4a95c90ab28ead50314161ea2c4016f3561033b41f687f0a76d/Django-1.9.7-py2.py3-none-any.whl#md5=5224b6f237a9e46a84fc0f9921f678ae:
        Expected md5 5224b6f237a9e46a84fc0f9921f678ae
             Got        f603e16057383b3ad12d8bda84492fbb

如何解决此问题(在Windows中)?

1 个答案:

答案 0 :(得分:3)

如果你收到像pip这样的错误:错误:没有这样的选项: - hash,你使用的Pip版本太旧了,请使用以下命令进行升级:

$ pip install --upgrade pip

在Windows上,推荐的命令是:

python -m pip install --upgrade pip

更新后,如果再次出现此错误, 使用" - no-cache-dir "升级/安装时:

pip --no-cache-dir install YOUR-PACKAGENAME

pip --no-cache-dir install --upgrade YOUR-PACKAGENAME

散列不同的一个很好的理由是,如果您使用现有散列未涵盖的平台,则可以使用带有轮子的包。