ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE

  今天安装tensorflow遇到的问题,第一次pip install tensorflow安装显示连接源timeout, 解决方案如下:

1 # 设置超时时间
2 pip --default-timeout=100  install tensorflow

  然后,又产生一个新问题,如下:

1 Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
2 Collecting tensorflow
3   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)
4      |██████▊                         | 35.0 MB 1.1 kB/s eta 1 day, 7:52:58
5 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.
6     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:
7         Expected sha256 44c8d979b2d19ed56dbe6b03aef87616d6138a58fd80c43e7a758c90105e9adf
8              Got        f27f1cad9e4c3f38c8d25067ff1a1cea5304bc2c8351d31def4f87201a19b9ef

解决方案如下:

1 # 即卸载干净之后,再重装
2 pip uninstall tensorflow
3 pip --default-timeout=100  install tensorflow

网上有博主提供直接升级安装的方式,没有试,不过应该是可行的,粘出来供大家参考:

1 pip install --upgrade tensorflow

希望对你有帮助~

作者:穷开心y
出处:https://home.cnblogs.com/u/hcy-fly/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
posted @ 2020-08-31 17:31  穷开心y  阅读(4781)  评论(0编辑  收藏  举报