要么就每次都加–trusted-host xxx 要么修改pip.conf 先找到pip.conf配置文件 查看pip.conf位置 以此为例,修改为 [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com