安装python包在md5中有问题 [英] installing python packages have issue in md5
问题描述
我正在使用Windows,并且当我想要安装软件包时出现以下错误:
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
该问题(在Windows中)如何处理?
what to do with this problem (In windows)?
推荐答案
如果出现类似pip的错误:error:no such option:--hash,表示您使用的Pip版本太旧,请使用以下命令升级:
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
在Windows上,推荐的命令是:
On Windows the recommended command is:
python -m pip install --upgrade pip
更新后,如果此错误再次出现, 升级/安装时使用"-no-cache-dir ":
After the update, if the this error appeared again, use "--no-cache-dir" when you upgrade/install:
pip --no-cache-dir install YOUR-PACKAGENAME
或
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.
这篇关于安装python包在md5中有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!