u版图安装matplotlib时,报错ERROR: Could not install packages due to an EnvironmentError

系统:u版图

报错
(环境问题)

ERROR: Could not install packages due to an EnvironmentError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',))

解决方法
(使用sudo权限)

sudo pip3 install matplotlib

如果需要安装在虚拟环境,则找到虚拟环境bin目录下的pip3,使用虚拟环境的pip3安装

sudo ./pip3 install matplotlib

猜你喜欢

转载自blog.csdn.net/qq_35526165/article/details/104173053