1、pip安装第三方库报错:check_hostname requires server_hostname
解决方法:关掉电脑浏览器代理
2、pip安装第三方库报错'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pytest/
解决方法:
1)需要换成国内镜像安装,
pip install requests -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
2)永久修改
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
常用的镜像源
阿里云:https://mirrors.aliyun.com/pypi/simple/ 中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/ 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/ 豆瓣:http://pypi.douban.com/simple/
3、安装第三方失败
找不到版本version的报错
1、python -m pip install --upgrade pip 先升级pip
2、用pip3重新安装第三方软件
pip3 install pytest -i Simple Index --trusted-host pypi.douban.com