pip 安装 tensorflow 出现以下错误:

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<1.14,>=1.13 from https://www.piwheels.org/simple/tensorflow/tensorflow-1.13.1-cp35-none-linux_armv7l.whl#sha256=6c00dd13db0791e83cb08d532f007cc7fd44c8d7b52662a4a0065ac4fe7ca18a (from mycroft-precise==0.3.0): Expected sha256 6c00dd13db0791e83cb08d532f007cc7fd44c8d7b52662a4a0065ac4fe7ca18a Got f679035a7cd96d24f826463bef208cd04f1eee50eb6023a158c05b529e17a71b

上述报错显示,下载包时期望得到 hash 值不是真正的 hash,pip 安装时包出现损坏,又可能时自身网络问题或者Python包的版本兼容性

解决方法:pip 包安装时添加一个--no-cahce-dir 即可解决如下:

pip install tensorflow --no-cache-dir
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐