【总述】先看外网是不是通的,否则可能一系列报错之后发现,只是因为没通网!
1. 直接【pip install tornado】开始报错!!!!联网后成功!!!
2. 【python -m pip install tornado】报错!!!!联网后没试!!!
查看【Defaulting to user installation because normal site-packages is not writeable】修改方式,看到有将【pip install XXX】改成【python -m pip install XXX】的,尝试了一下,报错!!!!
3. 【pip install tornado -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com】报错!!!!联网后没试!!!
查看【ERROR: Could not find a version that satisfies the requirement tornado (from versions: none)】修改方式,发现原因可能是python国内网络不稳定,直接导致报错。因此我们常用镜像源来解决此问题。如下:
【pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com】
...
尝试了若干方法之后,猛然惊醒是不是没联网呀,【curl www.baidu.com】试一下,发现果然没通!
之后添加代理,在尝试【curl www.baidu.com】通了,尝试方法1【pip install tornado】,下载成功!!!!