我尝试在 Ubuntu 14.04 上安装 scikit-image:
pip install -U scikit-image
我收到此错误:
Collecting scikit-image
Downloading scikit-image-0.11.2.tar.gz (18.6MB)
34% |########### | 6.5MB 83kB/s eta 0:02:25
Hash of the package https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.11.2.tar.gz#md5=9a2118cc4d18c038a7d22e3ce0141309 (from https://pypi.python.org/simple/scikit-image/) (d92e68a3277e7d75b472991cfc6806a0) doesn't match the expected hash 9a2118cc4d18c038a7d22e3ce0141309!
Bad md5 hash for package https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.11.2.tar.gz#md5=9a2118cc4d18c038a7d22e3ce0141309 (from https://pypi.python.org/simple/scikit-image/)
我再次运行上述命令,但反复出现此错误:
Collecting scikit-image
Using cached scikit-image-0.11.2.tar.gz
Hash of the package https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.11.2.tar.gz#md5=9a2118cc4d18c038a7d22e3ce0141309 (from https://pypi.python.org/simple/scikit-image/) (d92e68a3277e7d75b472991cfc6806a0) doesn't match the expected hash 9a2118cc4d18c038a7d22e3ce0141309!
Bad md5 hash for package https://pypi.python.org/packages/source/s/scikit-image/scikit-image-0.11.2.tar.gz#md5=9a2118cc4d18c038a7d22e3ce0141309 (from https://pypi.python.org/simple/scikit-image/)
begueradj@begueradj-Sampo:~$
答案1
删除 Pip 缓存
rm -rf ~/.pip/cache/
sudo rm -rf /root/.pip/cache
pip
或者不使用缓存直接运行:
--no-cache-dir
坏皮普?
- 你正在运行哪个版本
pip
?pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
- 升级
pip
sudo pip install --upgrade pip
网络不好/MitM 吗?
我刚刚下载了文件并验证:
9a2118cc4d18c038a7d22e3ce0141309 scikit-image-0.11.2.tar.gz
这意味着您没有下载完整的文件,正确的文件,或者是某些东西专门注入了坏文件。