installing python packages have issue in md5

一世执手 提交于 2019-11-30 14:25:16

问题


I'm using Windows and when I want Install packages I got below error:

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

what to do with this problem (In windows)?


回答1:


If you get an error like pip: error: no such option: --hash, you are using too old a version of Pip, use the following command to upgrade:

$ pip install --upgrade pip

On Windows the recommended command is:

python -m pip install --upgrade pip

After the update, if the this error appeared again, use "--no-cache-dir" when you upgrade/install:

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

or

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

A good reason for the hash to be different is if you use a platform that isn’t covered by the existing hashes for a package that has wheels.



来源:https://stackoverflow.com/questions/38028170/installing-python-packages-have-issue-in-md5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!