ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE
Posted ZSYL
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE相关的知识,希望对你有一定的参考价值。
问题描述
今天安装Tensorflow2.0过程出现报错,信息如下:
# 设置超时时间
pip --default-timeout=100 install tensorflow
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting tensorflow
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fb/59/1446c28d5dec00609ab664217acdbd37cf93704ae37233c1392465fc49e5/tensorflow-2.3.0-cp38-cp38-macosx_10_11_x86_64.whl (165.2 MB)
| 35.0 MB 1.1 kB/s eta day, 7:52:58
ERROR: 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.
tensorflow from https://pypi.tuna.tsinghua.edu.cn/packages/fb/59/1446c28d5dec00609ab664217acdbd37cf93704ae37233c1392465fc49e5/tensorflow-2.3.0-cp38-cp38-macosx_10_11_x86_64.whl#sha256=44c8d979b2d19ed56dbe6b03aef87616d6138a58fd80c43e7a758c90105e9adf:
Expected sha256 44c8d979b2d19ed56dbe6b03aef87616d6138a58fd80c43e7a758c90105e9adf
Got f27f1cad9e4c3f38c8d25067ff1a1cea5304bc2c8351d31def4f87201a19b9ef
解决方案
原因:通常是因为网速问题导致的下载错误,导致对应的哈希值不匹配。
第一种
# 即卸载干净之后,再重装
pip uninstall tensorflow
pip --default-timeout=100 install tensorflow
第二种
需要在pip时,添加"–upgrade
“参数即可。通常这时下载还会报错timeout
,因此多加一个”–default-timeout=100000
" 更为保险(timeout的赋值可以视情况变化)。
pip install --upgrade --default-timeout=100000 packagename -i http://pypi.douban.com/simple
参考:
衷心感谢!
以上是关于ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE的主要内容,如果未能解决你的问题,请参考以下文章
the error: no operator << matches these operands
ERROR Failed to compile with 541 errors 11:27:44 These dependencies were not found: * core-js/mod
求听力原文,these days, it seems as if half the books
These critical programs are missing or too old: gawk bison
These critical programs are missing or too old as ld
How do remove the CD / DVD install as a source for apt-get packages when installing new features?