更换pip 镜像
一般情况使用镜像
阿里云镜像
pip install pyserial -i https://mirrors.aliyun.com/pypi/simple --trusted-host=mirrors.aliyun.com
豆瓣镜像
pip install pyserial -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple
windows更换pip镜像
打开你电脑的 C:\Users\你个人的用户目录 新建pip文件夹然后在pip文件夹中建立pip.ini
文件右键用记事本打开文件然后在文件中输入
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
ubuntu更换pip镜像
mkdir -p ~/.pip/
touch pip.conf
vim pip.conf
在pip.conf中输入以下内容,保存退出.
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com