ERROR: Exception: Traceback (most recent call last)的解决方法在使用pip安装pillow时,总是提示ERROR: Exception: Traceback (most recent call last)
这是因为pip不支持断线重连,解决方法也很简单, pip 有国内镜像源。在 pip 时,只需要在后面加上 -i 指令就可以实现。
常用的两个源
阿里云https://mirrors.aliyun.com/pypi/simple/
清华 https://pypi.tuna.tsinghua.edu.cn/simple
接下来我们试一试切换源,下载一个 tensorflow 模块
$ pip install tensorflow -i https://mirrors.aliyun.com/pypi/simple/
可以看到,下载速度比直接下载快了许多
pip install <需要下载的模块> -i https://mirrors.aliyun.com/pypi/simple/
pip install <需要下载的模块> -i https://pypi.tuna.tsinghua.edu.cn/simple