pip安装imageio失败Cannot unpack file,cannot detect archive format

使用pip install直接安装时下载速度慢,且容易超时(Read timed out)

pip install imageio

错误如下:

ERROR: Exception:
socket.timeout: The read operation timed out

解决方案是利用镜像安装(一般的库可以直接用下列语句,但安装imageio等时会出现错误
语句:

pip install imageio-i https://pypi.tuna.tsinghua.edu.cn/simple

此时可能会出现如下错误:

 ERROR: Cannot unpack file C:\User...; charset=u
tf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users...

简单有效的解决方法,将语句换为:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn imageio

则安装成功:

Successfully installed imageio-2.5.0 pillow-6.1.0

你可能感兴趣的:(pip安装imageio失败Cannot unpack file,cannot detect archive format)